similar to: Rbind help needed

Displaying 20 results from an estimated 30000 matches similar to: "Rbind help needed"

2003 Apr 23
9
sum
Dear helpers I have a list where each element is a matrix (the list is obtained with lapply). I want to sum those matrices. Is there a function to do that? The sum function sums all the elements... -- http://adsl.sapo.pt
2003 Apr 21
3
index after rbind
I am using rbind to concatenate two dataframes, but after the rbind I get a strange "double" index. I am using rbind a number of times to make one large dataset. Is there a way to prevent the "double" index? Or is there some other way to concatenate the data (it looks like merge only works by columns)? Here is an example of the "double" index.
2002 Sep 10
2
Problems with rbind
Dear list I have a simple question that I have a mental block on: Having used a loop (from i = 1 to n) to assign some numerical values to row.list[[i]] e.g. row.list[[3]]= 0 1 I am wanting to combine the output into a simple matrix. for example, if I combine the output from persons 1 to 3 into a matrix, I thought I could do : h<-rbind(row.list[[1]]:row.list[[3]]) However, I get the
2002 Sep 30
5
Chi-Square Distribution Plots
Dear list I have a vector of values that allegedly have a chi-squared distribution. I want to create a plot that shows the values I have obtained, and the chi-squared distribution curve for the specified number of degrees of freedom to show what should have been obtained. At the moment I am plotting the values I have obtained as a histogram and somehow want to put on to this plot the
2002 Oct 14
2
Vector of quantiles
I have a quick question which is very simple but I seem to have a mental block! I'm using the pchisq function to specify a Chi Squared distribution with 9 df which I'm then going to use in the Kolmogorov-Smirnov Test to test some simulated values. so simply: pchisq(q, df=9) I know that q is the vector of quantiles but could anybody tell me what exactly this vector needs to contain?
2002 Sep 12
1
Problem with indexing
Dear List I am having a bit of a problem getting a program to work. For each of i=1 to n persons I have a matrix (different for each person) with m rows. What I want to do, is create m new data sets such that the first is made up of the first row for each person from the original matrices, the second contains the second row for each person from the original matrices etc etc up to the mth
2003 Oct 31
2
Summing elements in a list
Hi, Suppose that I have a list where each component is a list of two matrices. I also have a vector of weights. How can I collapse my list of lists into a single list of two matrices where each matrix in the result is the weighted sum of the corresponding matrices. I could use a loop but this is a nested calculation so I was hoping there is a more efficient way to do this. To help clarify,
2002 Sep 13
2
Sorting problem
Dear list I have a quick question which is probably very simple. I have a data frame, and want to sort the data by putting one column in to ascending order i.e becomes A B A B 1 0.5 3 0.4 2 0.9 1 0.5 3 0.4 4 0.7 4 0.7 2 0.9 I can't seem to find anything in the help about sorting data
2002 Oct 25
1
Quantil-quantile plot help
Dear list I am using the qq.plot command to create quantile-quantile plots. The plot should display a 45 degree reference line upon which the points of the graph should fall if the two distributions being examined are roughly equal. If I try: x<-rchisq(100, df=6) qq.plot(x, dist="chisq", df=6) Then I get a quantile plot which has an intercept of roughly 1 when the line should be
2002 Sep 30
2
Memory problem
Dear list I am running a data simulation, which is needed to simulate up to a million pieces of data. I am getting the following memory error : Error: cannot allocate vector of size 11 Kb In addition: Warning message: Reached total allocation of 255Mb: see help(memory.size) I am running a PC with 256Mb RAM and R seems to be taking up the entire allocation and is still not able to do the
2002 Nov 06
6
how to update installed packages to a new version of R?
I've just installed R 1.6.1 and would like to install all the contributed packages I had used in 1.5.1. It's not too hard to do this manually from Rgui, but I wondered if there is an easier way, something like writing the results of installed.packages() from 1.5.1 to a file and using that with install.packages() in 1.6.1, or just having 1.6.1 read what's in rw151/library. --
2002 Jul 07
3
Installation of package "mass"
Hello, I've downloaded the package "mass" and I've tried to install it, but it didn't work. Can you help me (I use Windows)? Katrin -------------- next part -------------- An HTML attachment was scrubbed... URL: https://stat.ethz.ch/pipermail/r-help/attachments/20020707/e560f42b/attachment.html
2004 Apr 26
1
names attribute of data.frames after rbind
Hi, If columns of a data.frame have a names attribute and we rbind two similar data.frames together, the names of the column of the resulting data.frame only has the correct values for the first component and has "" in all other positions. Is this a documented "feature" or a bug? If it is intentional, why? Here is a small example to show what I mean. The same behaviour
2014 Dec 17
2
vapply definition question
vapply <- function(X, FUN, FUN.VALUE, ..., USE.NAMES = TRUE) { FUN <- match.fun(FUN) if(!is.vector(X) || is.object(X)) X <- as.list(X) .Internal(vapply(X, FUN, FUN.VALUE, USE.NAMES)) } This is an implementor question. Basically, what happened to the '...' args in the call to the .Internal? cf lapply:, where the ... is passed. lapply <- function (X, FUN, ...)
2002 Sep 03
1
Bindata package problems
Dear list I am having a couple of problems with the package 'bindata'. Having installed it using install.packages("bindata"), I am finding that when I load it up as a library I get the following errors: > library(bindata) Loading required package: e1071 Loading required package: mvtnorm Warning messages: 1: There is no package called `e1071' in: library(package, char
2005 Feb 03
5
How to convert a list to a matrix
Hi Sorry to ask such a basic question. I have a list, each element of which is a vector of two values. What I actually want is a matrix with two columns, and one row per element of the list. Obviously I have tried as.matrix(), and as.vector() but I didn't expect the latter to work. I feel so lame asking this. Any suggestions? Mick
2005 Feb 17
6
Converting a list to a matrix - I still don't think I have it right
Hi We have touched on this before, but I don't think I quite got it right. So I have a list, each element of which is a a vector of 2 numbers: > l2 $cat000_a01 [1] 0.3429944 4.5138244 $cat000_a02 [1] 0.1929336 4.3064944 $cat000_a03 [1] -0.2607796 4.1551591 What I actually want to convert this into is a matrix with the names (cat000_a01 etc) as row names, the first element of each of
2011 Mar 15
4
Element by element mean of a list of matrices
Hi All, is there any effiective and dense/compact method to calculate the mean of a list of - of course coincident - matrices on an element by element basis? The resulting matrix' [i, j]-th element is the mean of the list's matrices' [i, j]-th elements respectively... Iterating by for statement is quite straightforward, but I am seeking for a more elegant solution, and my attempt with
2002 Sep 25
1
rbind(NULL,NULL) and simplex()
Hello everybody. I found out the other day something quite astonishing (which I guess is not astonishing at all to those in the know): in d-dimensional space, determining whether a given point is inside the convex hull of a set of n points is elegantly and quickly solvable using linear programming. If the columns of matrix "ff" are the coordinates of the set of points, then in d=2
2003 Apr 15
5
making a dataframe out of lapply() result
Dear R-helpers, i have a question on how to vectorize this problem: i have a dataframe: tester <- data.frame(groups=c("A","A","B","B","C","C"), one=c(1,1,2,2,3,3), two=c(6,6,7,7,8,8)) # i split it into a list tester.L <- split(tester, tester$groups) # And want to keep only the first item in each: lapply(tester.L, function(x) x