similar to: Deparsing '...'

Displaying 20 results from an estimated 10000 matches similar to: "Deparsing '...'"

2005 Dec 09
3
[R] data.frame() size
Hi, Please see below for post on r-help regarding data.frame() and the possibility of dropping rownames, for space and time reasons. I've made some changes, attached, and it seems to be working well. I see the expected space (90% saved) and time (10 times faster) savings. There are no doubt some bugs, and needs more work and testing, but I thought I would post first at this stage. Could some
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]
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
2011 Sep 17
1
Name the dots! ("...")
Dear Folk-- Suppose I have some objects A, B & C, and a function getDots <- function(...) {args <- list(...) etc.} If I do a call to getDots(A, B, C) then the variable args will be assigned to a list which contains the objects to which A, B & C refer, but which will not (except by happenstance) contain the names A, B, or C. I would like getDots to return a named list, with the
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
2014 Jul 28
1
Parsing and deparsing of escaped unicode characters
In both R and JSON (and many other languages), unicode characters can be escaped using a backslash followed by a lowercase "u" and a 4 digit hex code. However when deparsing a character vector in R on Windows, the non-latin characters get escaped as "<U+" followed by their 4 digit hex code and ">": > x <- "I like \u5BFF\u53F8" > cat(x) I like
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
2007 Oct 25
3
Deparsing part of a list argument
Here's a simple example of the type of function I'm trying to write, where the first argument is a list of functions: myfun <- function(funlist, vec){ tmp <- lapply(funlist, function(x)do.call(x, args = list(vec))) names(tmp) <- names(funlist) tmp } > myfun(list("Summation" = sum, prod, "Absolute value" = abs), c(1, 4, 6, 7)) $Summation [1]
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 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
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
1999 Oct 23
1
greek letters and deparsing in title
Dear All, In the title of a plot, I would like to mix greek letters with numbers, where the numbers are obtained from a particular function to a vector (e.g., max(x)); in each call, the value of this vector can change. Without greek symbols I use something like: title(sub=paste("x1=", deparse(x[1]),"beta = ",deparse(max(x)), "rho = ", deparse(min(x)))) but I'd