可能是一个安静的愚蠢问题,但我无法更改 Rprofile 中的选项:
.First <- function(){
options(width=140)
library(ggplot2)
library(fPortfolio)
library(reshape2)
library(plyr)
library(plm)
library(XLConnect)
library(scales)
library(lattice)
library(sos)
library(car)
library(fmsb)
library(reshape)
library(gridExtra)
library(rpanel)
library(psych)
library(fUnitRoots)
library(googleVis)
library(rattle)
library(gplots)
library(RODBC)
library(fGarch)
library(RcppArmadillo)
library(fmsb)
library(forecast)
library(playwith)
###names
n <- function(df) matrix(names(df))
##head tail
ht <- function(d) rbind(head(d,10),tail(d,10))
###Missing values
propmiss <- function(dataframe) {
m <- sapply(dataframe, function(x) {
data.frame(
nmiss=sum(is.na(x)),
n=length(x),
propmiss=sum(is.na(x))/length(x)
)
})
d <- data.frame(t(m))
d <- sapply(d, unlist)
d <- as.data.frame(d)
d$variable <- row.names(d)
row.names(d) <- NULL
d <- cbind(d[ncol(d)],d[-ncol(d)])
return(d[order(d$propmiss), ])
}
}
cat("\nNu kör vi!", date(), "\n")
.Last <- function(){
cat("\nDags att ta det lite lugnt! ", date(), "\n")
}
在我上面的 Rprofile 中,我想更改options(width=140)
但它不起作用。此外,我无法获得该功能ht
并由propmiss
Rprofile 加载。有什么建议么?
此致