similar to: poor rbind performance

Displaying 20 results from an estimated 1000 matches similar to: "poor rbind performance"

2007 Oct 18
2
error: unused arguments
Hi what does this mean when i get above error? When I call function foo(), specifying parameters a and b as below a<-5 b<-6 > y <- foo(a,b) > Error in foo(a, b) : unused argument(s) (6) Thanks Zava -------------------------------------------------------- This is not an offer (or solicitation of an offer) to bu...{{dropped:24}}
2007 Jul 03
2
vertically concatenating data frames
Hi, what is the recommended way to vertically concatenate 2 data frames with the same column names but different number of rows? My problem is something along these lines: df1 <- data.frame(var1=var1,var2=var2,var3=var3) # nrow(df1)=1000 df2 <- data.frame(var1=var4,var2=var5,var3=var6) # nrow(df2)=2000 I tried df <- c(df1,df2), no success. stack does not seem to be appropriate
2007 Jul 12
2
lead
Hi, is there any function in R that shifts elements of a vector to the opposite direction of what Lag() of the Hmisc package does? (something like, Lag(x, shift = -1) ) Thanks Zava -------------------------------------------------------- This is not an offer (or solicitation of an offer) to buy/se...{{dropped}}
2007 Jun 14
2
connecting to DB2 database
Hi, i am trying to connect to a DB2 server using the DBI library. getData <- function() { driver <- dbDriver("DB2") conn <- dbConnect(driver,"server","uname","pword") data <- dbSendquery(conn, "select etc.") } When I run the function, i get the error > data <- getData() Error in
2007 Jul 02
1
compute time span in months between two dates
Hi, I am just starting to play with R. What is the recommended manner for calculating time spans between 2 dates? In particular, should I be using the "chron" or the "date" package (so far I just found how to calculate a timespan in terms of days)? Thanks Zava -------------------------------------------------------- This is not an offer (or solicitation of an offer) to
2007 Jul 05
1
converting list to an array
Hi, I have a list myList (see below) that consists of id's $'7',....,$'10' and each id has an individual array, the length of which can vary from id to id. How can I convert this list into an array, ie. stacking the individual arrays into one large array? Thanks Zava myList: $`7` [1] 20050201 20050301 20050401 20050501 $`8` [1] 20050201 20050301 20050401
2007 Jul 05
1
generating lower triangular matrix
Hi, I would like to generate below triangular matrix for some a. 0 0 0 0 0 0 1 0 0 0 0 0 a 1 0 0 0 0 a^2 a 1 0 0 0 a^3 a^2 a 1 0 0 a^4 a^3 a^2 a 1 0 What's an efficient way to do this? (this matrix being KxK, K very large) Thanks Zava -------------------------------------------------------- This is not an offer (or solicitation of an offer) to buy/se...{{dropped}}
2007 Jul 18
1
passing a parameter to a file from command line
Hi, I have a file fileFoo.R, say that contains these two lines, invoking function foo that is specified in "foo_details.R": source("foo_details.R") foo(parameter1) I want to specify and pass parameter1 in my command line when invoking R in linux: R --no-save <fileFoo.R. How can I do that? And how can I retrieve the value of parameter1 in my fileFoo.R function
2007 Jun 14
0
connecting to db2 via RJDBC
Hello, I seem to have issues with setting the driver: My code: library(RJDBC) getStatic <- function() { # set driver driverClass <- JDBC("com.ibm.db2.jcc.DB2Driver","someClassPath.jar","'") conn <- dbConnect(driverClass,"serverName") etc etc } I get this error > data <-getData()
2010 Oct 19
3
scatter.smooth() fitted by loess
Hi there, I would like to draw a scatter plot and fit a smooth line by loess. Below is the data. However, the curve line started from 0, which my "resid" list doesn't consist of 0 value. It returned some warnings which I don't know if this is the reason affecting such problem. Here I also attached the warning messages. Please let me know if there is a solution to fix this. Thank
2012 Jun 20
2
[LLVMdev] Exception handling slowdown?
Did something change with exception handling recently? A bunch of lit bots are showing slower compile times for many tests. Ciao, Duncan. On 20/06/12 07:53, llvm-testresults at cs.uiuc.edu wrote: > > lab-mini-03__O0-g__clang_DEV__x86_64 test results > <http://llvm.org/perf/db_default/v4/nts/1283?compare_to=1278&baseline=999> > > Run Order Start Time Duration >
2012 Nov 23
2
[LLVMdev] [cfe-dev] costing optimisations
On 23.11.2012, at 15:12, john skaller <skaller at users.sourceforge.net> wrote: > > On 23/11/2012, at 5:46 PM, Sean Silva wrote: > >> Adding LLVMdev, since this is intimately related to the optimization passes. >> >>> I think this is roughly because some function level optimisations are >>> worse than O(N) in the number of instructions. >>
2012 Jun 25
0
[LLVMdev] Exception handling slowdown?
Nothing that I'm aware of has changed with EH. Is it possible to bisect the problem? -bw On Jun 20, 2012, at 12:38 AM, Duncan Sands <baldrick at free.fr> wrote: > Did something change with exception handling recently? A bunch of lit bots are > showing slower compile times for many tests. > > Ciao, Duncan. > > On 20/06/12 07:53, llvm-testresults at cs.uiuc.edu
2009 Sep 24
2
aggregate() - error message
Dear list, ? would anybody be able to tell me why the statement ? Tripstatistics=aggregate(TripsData[2:3],by=list(Trip=Tripmatch),FUN="mean") ? seems to work well with TripsData 1 but not with TripsData 2 ? ? With TripsData 2 it yields ? Error in FUN(X[[1L]], ...) : arguments must have same length I can't see a difference in the two data sets. Could someone shed light on the error
2012 Jul 05
2
[LLVMdev] Exception handling slowdown?
Hi Bill, > Nothing that I'm aware of has changed with EH. Is it possible to bisect the problem? I don't see any relevant LLVM changes, so I guess clang C++ compilation slowed down due to some clang changes. I'm not going to investigate this. Ciao, Duncan. > > -bw > > On Jun 20, 2012, at 12:38 AM, Duncan Sands <baldrick at free.fr> wrote: > >> Did
2007 Jun 21
1
what is "better" when combining data frames? merge vs. rbind & cbind
I often need to "combine" data frames, sometimes "vertically" and other times "horizontally". When it "better" to use merge? When is it better to use rbind or cbind? Are there clear pros and cons of each approach? --------------------------------- [[alternative HTML version deleted]]
2013 May 27
0
'rbind' in example(make.unique)
> rbind(data.frame(x = 1), data.frame(x = 2), data.frame(x = 3)) x 1 1 2 2 3 3 > rbind(rbind(data.frame(x = 1), data.frame(x = 2)), data.frame(x = 3)) x 1 1 2 2 3 3 Above is the result of running the last two lines in "Examples" of 'make.unique'. I don't see the work of 'make.unique' there. It used to work, when there is no automatic row names for data
2011 Aug 10
1
rbind/cbind
Dear list, I wonder if there a better way to have rbind/cbind/append to create the first element (if it is empty) instead of doing the following in a loop? for (i in 1:10) { if (i == 1) { aRow = SomeExpression(i) } else { aRow = rbind(aRow,SomeExpression(i)) } } Thanks Anthony
1999 Nov 23
0
rbind problem
In the new version 0.90.0, rbind won't take a vector and a matrix from me, but works OK if I coerce the vector to a matrix. The following was run on a new session (i.e., no prior work), and has been duplicated on 2 machines: an SGI running Irix 6.5, and an Intel box running Red Hat Linux 6.0. Either case works fine in version 0.65.1. > t3 <- c(.5, .5) > t4 <-
2005 May 31
1
Add Columns and Order for Rbind?
I am using rbind to add one list with one row to another master list. The problem is that not all columns exist in both lists. What methods would you recommend to reorder one list based on the column names of another? If both sets have the same order and columns, I can then use rbind. I can live with columns being added to the master list set it makes the task easier using something like