similar to: [R] data.frame() size

Displaying 20 results from an estimated 8000 matches similar to: "[R] data.frame() size"

2005 Dec 08
2
data.frame() size
Hi, In the example below why is d 10 times bigger than m, according to object.size ? It also takes around 10 times as long to create, which fits with object.size() being truthful. gcinfo(TRUE) also indicates a great deal more garbage collector activity caused by data.frame() than matrix(). $ R --vanilla .... > nr = 1000000 > system.time(m<<-matrix(integer(1), nrow=nr, ncol=2)) [1]
2006 Mar 02
5
Deparsing '...'
Hi, The following function works, but is there a neater way to write it? f = function(x,...) { # return a character vector of the arguments passed in after 'x' gsub(" ","",unlist(strsplit(deparse(substitute(list(...))),"[(,)]")))[-1] } > f(x,a,b,c*d) [1] "a" "b" "c*d" > Thanks. [[alternative HTML
2004 Nov 26
2
Tcl error - brace in argument?
Hi all, Does anyone know a solution for this error ? > tkwidget(dlg, "iwidgets::spinint", range="{0 23}") Error in structure(.External("dotTclObjv", objv, PACKAGE = "tcltk"), class = "tclObj") : [tcl] wrong # args: should be ".31.1.19 configure -range {begin end}". Thanks, Matthew [[alternative HTML version
2006 May 23
4
Avoiding a memory copy by [[
Hi, n = 10000000 L = list(a=integer(n), b=integer(n)) L[[2]][1:10] gives me the first 10 items of the 2nd vector in the list L. It works fine. However it appears to copy the entire L[[2]] vector in memory first, before subsetting it. It seems reasonable that "[[" can't know that all that is to be done is to do [1:10] on the result and therefore a copy in memory of the entire
2004 May 26
1
FW: is.weekend() odd behaviour
Kurt, Uwe suggested I write to you as maintainer of chron ... at the start of is.weekend, in the check on the argument type, maybe just change chron() to as.chron()? This would ensure as.chron.POSIXt gets called on POSIXt arguments, and (I think) fixes the problem. I tested and it seems ok. No warning/error required. > is.weekend function(x) { if(!inherits(x, "dates"))
2006 Mar 31
3
Function dependency function
Hi, Is there a function taking a function as an argument, which returns all the functions it calls, and all the the functions those functions call, and so on? I could use Rprof, but that would involve executing the function, which may miss some branches of code. I'd really like a function which looks at the source code to work out all the functions that could possibly be called. When I
2006 May 02
4
"a"+"b"
Hi, Is there a way to define "+" so that "a"+"b" returns "ab" ? > setMethod("+",c("character","character"),paste) Error in setMethod("+", c("character", "character"), paste) : the method for function '+' and signature e1="character", e2="character" is sealed
2009 Aug 27
1
[Fwd: Re: Video demo of using svSocket with data.table]
Forwarded to R-Help, because I think it could interest people following this thread. Clearly, RServe and svSocket have different goals and very little overlap. Best, Philippe -------- Original Message -------- Subject: Re: Video demo of using svSocket with data.table Date: Wed, 26 Aug 2009 20:34:19 +0100 From: Matthew Dowle <mdowle at mdowle.plus.com> Reply-To: Matthew Dowle
2010 Aug 09
2
coef(summary) and plyr
Dear all, I?m having trouble getting a list of regression variables back into a dataframe. mydf <- data.frame(x1=rnorm(100), x2=rnorm(100), x3=rnorm(100)) mydf$fac<-factor(sample((0:2),replace=T,100)) mydf$y<- mydf$x1+0.01+mydf$x2*3-mydf$x3*19+rnorm(100) dlply(mydf,.(fac),function(df) lm(y~x1+x2+x3,data=df))->dl here I?d like to use ldply(dl,coef(summary)) or something
2012 Mar 14
3
merge bug fix in R 2.15.0
Is it intended that the first suffix can no longer be blank? Seems to be caused by a bug fix to merge in R 2.15.0. $Rdevel --vanilla DF1 = data.frame(a=1:3,b=4:6) DF2 = data.frame(a=1:3,b=7:9) merge(DF1,DF2,by="a",suffixes=c("",".1")) Error in merge.data.frame(DF1, DF2, by = "a", suffixes = c("", ".1")) : there is already a column
2019 Feb 18
2
Error in rbind(info, getNamespaceInfo(env, "S3methods"))
Dear all, I'm experiencing an unusual installation error for one package. Could anyone suggest how I can best investigate this from here please? I'm sorry this isn't very much to go on. Hopefully someone can point me in the right direction. The problem seems to be my library. It is large (3,418 packages) and I'd like to avoid rebuilding it, if possible. All packages are up to
2010 Mar 05
1
Suggestion to add crantastic to resources section on posting guide
Under the "further resources" section I'd like to suggest the following addition : * http://crantastic.org/ lists popular packages according to other users votes. Consider briefly reviewing the top 30 packages before posting to r-help since someone may have already released a package that solves your problem. Thats just a straw man idea so I hope there will be answer, or
2012 Jan 17
1
names<- appears to copy 3 times?
Hi, $ R --vanilla R version 2.14.1 (2011-12-22) Platform: i686-pc-linux-gnu (32-bit) > DF = data.frame(a=1:3,b=4:6) > DF a b 1 1 4 2 2 5 3 3 6 > tracemem(DF) [1] "<0x8898098>" > names(DF)[2]="B" tracemem[0x8898098 -> 0x8763e18]: tracemem[0x8763e18 -> 0x8766be8]: tracemem[0x8766be8 -> 0x8766b68]: > DF a B 1 1 4 2 2 5 3 3 6 > Are those 3
2012 Feb 27
1
Identical copy of base function
Hello, Regarding this in R-devel/NEWS/New features : o ?library(pkg)? no longer warns about a conflict with a function from ?package:base? if the function is an identical copy of the base one but with a different environment. Why would one want an identical copy in a different environment? I'm thinking I may be missing out on a trick here. Matthew
2009 Apr 21
1
Closed-source non-free ParallelR ?
Dear R-devel, REvolution appear to be offering ParallelR only when bundled with their R Enterprise edition. As such it appears to be non-free and closed source. http://www.revolution-computing.com/products/parallel-r.php Since R is GPL and not LGPL, is this a breach of the GPL ? Below is the "GPL and ParallelR" thread from their R forum. mdowle > It appears that ParallelR
2013 Apr 21
1
cedta decided 'igraph' wasn't data.table aware
Hi, what does this mean? --8<---------------cut here---------------start------------->8--- > graph <- graph.data.frame(merged[!v,], vertices=ve, directed=FALSE) cedta decided 'igraph' wasn't data.table aware cedta decided 'igraph' wasn't data.table aware cedta decided 'igraph' wasn't data.table aware cedta decided 'igraph' wasn't
2010 Feb 22
1
shash in unique.c
Looking at shash in unique.c, from R-2.10.1 I'm wondering if it makes sense to hash the pointer itself rather than the string it points to? In other words could the SEXP pointer be cast to unsigned int and the usual scatter be called on that as if it were integer? shash would look like a slightly modified version of ihash like this : static int shash(SEXP x, int indx, HashData *d) {
2011 Apr 07
5
R licence
Hi, is it possible to use some statistic computing by R in proprietary software? Our software is written in c#, and we intend to use http://rdotnet.codeplex.com/ to get R work there. Especially we want to use loess function. Thanks, Best regards, Stanislav [[alternative HTML version deleted]]
2011 Apr 26
1
help.request() for packages?
Hi, Have I missed something, or misunderstood? The r-help posting guide asks users to contact the package maintainer : "If the question relates to a contributed package, e.g., one downloaded from CRAN, try contacting the package maintainer first. [snip] ONLY [only is bold font] send such questions to R-help or R-devel if you get no reply or need further assistance. This applies to both
2014 Sep 26
1
configure: error: linking to Fortran libraries from C fails
Hi all, Nice one for a Friday afternoon ... I'm trying to follow this section of the manual : http://cran.r-project.org/doc/manuals/r-devel/R-exts.html#Using-Undefined-Behaviour-Sanitizer to build R-devel (as of a few hours ago: rev 66684) with -fsanitize=undefined,address. My OS is Linux Mint Debian Edition. To get gcc-4.9 I added Debian testing to my apt sources and ran : sudo