library(gdata)
?keep
data(women, cars)
keep(cars)
## To remove all objects except cars, run:
## keep(cars, sure=TRUE)
"A big computer, a complex algorithm and a long time does not equal science." -- Robert Gentleman
Visualizzazione post con etichetta environment. Mostra tutti i post
Visualizzazione post con etichetta environment. Mostra tutti i post
lunedì 26 novembre 2007
giovedì 9 agosto 2007
R package installation and administration
A short list of basic but useful commands for managing
the packages in R:
the packages in R:
# install a package
install.packages("ROCR")
# visualize package version
package_version("pamr")
# update a package
update.packages("Cairo")
# remove a package
remove.packages("RGtk2")
mercoledì 2 maggio 2007
ls() improved!
This marvelous little function shows all objects in the current workspace
by mode, class and 'size'! Thanks to Bendix Carstensen!
by mode, class and 'size'! Thanks to Bendix Carstensen!
lls <- function (pos = 1, pat = "")
{
dimx <- function(dd) if (is.null(dim(dd)))
length(dd)
else dim(dd)
lll <- ls(pos = pos, pat = pat)
cat(formatC("mode", 1, 15), formatC("class", 1, 18),
formatC("name",1, max(nchar(lll)) + 1), "size\n-----------------------------------------------------------------\n")
if (length(lll) > 0)
{
for (i in 1:length(lll))
{
cat(formatC(eval(parse(t = paste("mode(", lll[i],
")"))), 1, 15), formatC(paste(eval(parse(t = paste("class(",
lll[i], ")"))), collapse = " "), 1, 18), formatC(lll[i],
1, max(nchar(lll)) + 1), " ", eval(parse(t = paste("dimx(", lll[i], ")"))), "\n")
}
}
}
Iscriviti a:
Post (Atom)