similar to: Size of an object in workspace

Displaying 20 results from an estimated 3000 matches similar to: "Size of an object in workspace"

2007 Jan 09
3
dimensions of a all objects
Why will the following command not work sapply(objects(),dim) What does it say about the objects list? What does it say about the dim command? Likewise, the following also does not work all<-ls() for (f in all) print(dim(f)) -- Farrel Buchinsky [[alternative HTML version deleted]]
2006 Sep 27
3
Space required by object?
Does R provide a function analogous to LS() or str() that reports the storage space, on disk or in memory, required by objects? Ben Fairbank
2007 Jun 11
2
Rounding?
I was a bit puzzed by: > formatC(6.65,format="f",digits=1) [1] "6.6" So I experimented and found: > formatC(6.6500000000000001,format="f",digits=1) [1] "6.6" > formatC(6.650000000000001,format="f",digits=1) [1] "6.7" > round(6.6500000000000001,1) [1] 6.7 > round(6.650000000000001,1) [1] 6.7 > version
2001 Oct 26
1
Bug or new concept in formatC?
As a sequel to my previous mail on cut, formatC does not produce what I have been taught is significant digits: > x <- c(1.0793,1.0796, 11.0954, 11.0736 ) > formatC(x,digits=3,format="g") [1] "1.08" "1.08" "11.1" "11.1" (3,3,3,3) significant digits OK > formatC(x,digits=3,format="f") [1] "1.079"
2006 Dec 14
5
Better way to change the name of a column in a dataframe?
Hello R users -- If I have a dataframe such as the following, named "frame" with the columns intended to be named col1 through col6, > frame col1 col2 cmlo3 col4 col5 col6 [1,] 3 10 2 6 5 7 [2,] 6 8 4 10 7 1 [3,] 7 5 1 3 1 8 [4,] 10 6 5 4 9 2 and I want to correct or otherwise change the
1999 Feb 26
1
Re: trailing zeroes
> Date: Fri, 26 Feb 1999 09:59:39 +0000 > From: Bendix Carstensen <bxc at svs.dk> > When you require 2 digits you expect to find 5.96 printed Correction, _you_ expect! Very few computer programs do that. You cannot `require' two digits by options(digits=2): ?options says digits: controls the number of digits to print when print- ing numeric values. It is a
2006 Jan 05
2
Splitting the list
I've changed the heading because this really is another thread. I think it inevitable that there will, in the course of time, be other lists that are devoted, in some shape or form, to the concerns of practitioners (at all levels) who are using R. One development I'd not like to see is fracture along application area lines, allowing those who are comfortable in coteries whose
2018 Mar 07
3
Names of variables needed in newdata for predict.glm
I would like to extract the names, modes [numeric/factor] and levels of variables needed in a data frame supplied as newdata= argument to predict.glm() Here is a small example illustrating my troubles; what I want from (both of) the glm objects is the vector c("x","f","Y") and an indication that f is a factor: library( splines ) dd <- data.frame( D =
2008 Jul 29
2
FW: Installing BRugs
A funny thing happened when I wanted a student of mine to install Brugs. Using the InstallPackages in the windows version, firts gives an erro, but trying again works flawlessly. R version is 2.7.0 on WinXP. Any explanation? Bendix Carstensen ______________________________________________ Bendix Carstensen Senior Statistician Steno Diabetes Center Niels Steensens Vej 2-4 DK-2820 Gentofte
2008 Jun 20
2
The Green Book and its relevance to R
I bogged down about half way through reading the Green Book, in part because it became increasingly difficult to understand how some of the ideas related to R, as opposed to S (which I have not used). Does any reader know whether there is a document that points out differences between S and R that would be helpful in reading the Green Book? Ideally, perhaps, I need a "crib sheet" to
2018 Mar 08
0
Names of variables needed in newdata for predict.glm
Hi, Some try: > names(mi$xlevels) [1] "f" > all.vars(mi$formula) [1] "D" "x" "f" "Y" > names(mx$xlevels) [1] "f" > all.vars(mx$formula) [1] "D" "x" "f" When offset is indicated out of the formula, it does not work... Marc Le 07/03/2018 ? 06:20, Bendix Carstensen a ?crit?: > I would like
2018 Mar 31
1
Names of variables needed in newdata for predict.glm
all.vars works fine, EXCEPT, it give a bit too much. I only want the regression variables, but in the following example I also get "k" the variable holding the chosen knots. Any machinery to find only "real" regression variables? cheers, Bendix library( splines ) y <- rnorm(100) x <- rnorm(100) k <- -1:1 ml <- lm( y ~ bs(x,knots=k) ) mg <- glm( y ~
2008 Nov 24
1
FW: read.ssd
Did not seem to reach Saikat DebRoy, this might be the forum. Bendix -----Original Message----- From: BXC (Bendix Carstensen) Sent: 24. november 2008 15:00 To: 'saikat at stat.wisc.edu'; 'stvjc at channing.harvard.edu' Subject: read.ssd It's always annoyed me that that read.ssd crashed on datasets with long variable names, but the other day a collegue of mine pointed out to
2004 May 24
2
Month names
This is how I get the month names from within R: > mon <- rep(strptime("01/01/1952", format = "%d/%m/%Y"), 12) > mon$mon <- mon$mon + 0:11 > mnam <- months(mon, abbreviate = F) > mnam [1] "januar" "februar" "marts" "april" "maj" "juni" "juli" "august"
2009 Apr 27
2
The .tex version of the manual in foo.Rcheck
In version 2.8.1, running Rcmd check on the package foo would leave the file foo-manual.tex in the folder foo.Rcheck. But as of 2.9.0 only foo-manual.pdf and foo-manual.log are there. Is this intentional? Anyway it is inconvenient, because I would occasionally like to include the manual at the end of a set of exercises, and this was a convenient file to \input with a few select %'s added.
2000 Feb 08
2
Windows metafile
Running R : Copyright 1999, The R Development Core Team Version 0.90.1 (December 15, 1999) on NT 4.0 gives me problems with: win.metafile(file="./x.emf") x <- 1:100/7 plot(x,cos(x),type="n") lines(x,sin(x)) abline(v=0:15,h=-2:2/2,col=gray(0.8)) Only labels and titles on axes are in the file. No axes or lines of any kind. (I look at the file by inserting it in Word,
2007 Jan 19
4
Newbie question: Statistical functions (e.g., mean, sd) in a "transform" statement?
Greetings listeRs - Given a data frame such as times time1 time2 time3 time4 1 70.408543 48.92378 7.399605 95.93050 2 17.231940 27.48530 82.962916 10.20619 3 20.279220 10.33575 66.209290 30.71846 4 NA 53.31993 12.398237 35.65782 5 9.295965 NA 48.929201 NA 6 63.966518 42.16304 1.777342 NA one can use "transform" to
2008 May 18
1
Figure environment and includegraphics options from Sweave
Tha handy thinb about the fig=TRUE option in Sweave is that you do not have to bother about filenames and starting and stpping the device. I want the the resulting LaTeX to look as: \begin{Schunk} \begin{Sinput} > x <- seq(-2 * pi, 2 * pi, 0.1) > plot(x, cos(x), type = "l", lwd = 4) \end{Sinput} \end{Schunk} \begin{figure} \includegraphics[width=0.6\textwidth]{xx-001}
2005 Feb 17
1
How to get interction terms first in a model
Consider the following two specifications of a model: library( splines ) x <- 1:100 y <- rnorm( 100 ) w <- rep( 1, 100 ) A <- factor( sample( 1:2, 100, replace=T ) ) B <- factor( sample( letters[1:4], 100, replace=T ) ) summary( lm( y ~ ns( x, knots=c(30, 50, 70 ), intercept=T ):A - 1 + B ) ) summary( lm( y ~ ns( x, knots=c(30, 50, 70 ), intercept=T ):A - 1 + B:w ) ) The
2004 Nov 03
1
Building a package under WIN2000 / rw2.0
I have an odd problem in building a package with only R-code in it. I have a package mainly used by myself which I last build under R 1.9.0. The operation system is Win2000 5.00.2195, Service Pack 3 When I do: c:\stat\r\rw2000\bin\Rcmd install --docs=normal --build --library=c:\stat\R\bxc\library c:\stat\R\bxc\library.sources\xx then after updating help pages I get: preparing package xx for