Displaying 20 results from an estimated 20000 matches similar to: "using rbind() on multiple objects at once"
2010 May 19
1
Calling R-tists
Participants in the R User Conference, useR! 2010, July 21-23,
(http://R-project.org/useR-2010) will each receive a t-shirt, thanks to
the sponsorship of Mango Solutions (http://www.mango-solutions.com/).
This email is a call for designs for the front of the t-shirt. The design
should be made using a single color of your choice. The design should be
in the form of a high-resolution (at least
2011 Sep 23
4
'save' saved object names instead of objects
Hello,
I created an array to hold the results of a series of simulations I'm
running:
d.eta <- array(0,dim=c(3,3,200))
<simulation goes here and populates the array but it's not important>
Then I tried to save the results using this:
save(d.eta,file="D:/Simulation Results/sim 9-23-11 deta")
When I later tried to reload them using this:
d.eta <-
2008 May 23
3
nls diagnostics?
Hi, All:
What tools exist for diagnosing singular gradient problems with
'nls'? Consider the following toy example:
DF1 <- data.frame(y=1:9, one=rep(1,9))
nlsToyProblem <- nls(y~(a+2*b)*one, DF1, start=list(a=1, b=1),
control=nls.control(warnOnly=TRUE))
Error in nlsModel(formula, mf, start, wts) :
singular gradient matrix at initial
2007 Mar 05
3
Rbind with data frames -- column names question
As part of my work, I am trying to append matrices onto data frames.
Naively I assumed that when rbinding a data.frame and matrix, the matrix
would be coerced and appended, keeping the names from the data frame.
Clearly, I am not fully understanding the process by which rbind works.
Example code:
> A<-data.frame(1,1,1); names(A)=letters[1:3] ; B<-matrix(0,2,3)
> rbind(A,B)
2008 Apr 18
2
rzinb (VGAM) and dnbinom in optim
Dear R-help gurus (and T.Yee, the VGAM maintainer) -
I've been banging my head against the keyboard for too long now, hopefully someone can pick up on the errors of my ways...
I am trying to use optim to fit a zero-inflated negative binomial distribution. No matter what I try I can't get optim to recognize my initial parameters. I think the problem is that dnbinom allows either
2011 Mar 15
1
Problem with nls.lm function of minpack.lm package.
Dear R useRs,
I have a problem with nls.lm function of minpackl.lm package.
I need to fit the Van Genuchten Model to a set of data of Theta and hydraulic conductivity with nls.lm function of minpack.lm package.
For the first fit, the parameter estimates keep changing even after 1000 iterations (Th)
and
I have a following error message for fit of hydraulic conductivity (k);
Reason for
2013 Feb 26
2
merging or joining 2 dataframes: merge, rbind.fill, etc.?
#I want to "merge" or "join" 2 dataframes (df1 & df2) into a 3rd
(mydf). I want the 3rd dataframe to contain 1 row for each row in df1
& df2, and all the columns in both df1 & df2. The solution should
"work" even if the 2 dataframes are identical, and even if the 2
dataframes do not have the same column names. The rbind.fill function
seems to work. For
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.
2005 Oct 27
1
tcltk package problems (R 2.2.0, SuSE 10)
Hi
I installed R 2.2.0 from source and I have the packages for tcl and tk
installed on my system, but the package tcltk says, when I try to load
the library tcltk: Tcl/Tk support is not available on this system.
Are there any settings / variables which I have to set so that R
recognises that Tcl/Tk support is installed on the system?
Rainer
--
NEW TELEPHONE NUMBER
Tel: +27 - (0)72 808
2006 Mar 15
3
click on graph and select data points?
Hi all,
I am doing some clustering and the clustered results are presented in a
"pairs" plot showing 4 clusters...
I made the data points belong to 4 different clusters displaying different
colors.
Now I want to select the best clustered class, how can I click on the data
point, and the program returns the index of that cluster(its class number,
or color number)?
Also, if I would
2006 Jul 13
2
Write a summary or a longer text to a graphical device
How can I write a text, such as a result of a function or an explanation
to a graphic device?
When I try plot, I'm unable to reduce the axes.
Greetings
torsten
2006 Feb 07
2
Using R to process spectroscopic data
Dear R-users,
I would like to process some spectroscopic data with R, and I was hoping
some people might have some example code on how to do this.
I would like to be able to do the following things:
* Detect outlier-spectra -> This can be done by using scoreplot from the
pls package
* Determine the range of the spectrum to be used -> For this, I should
be able to calculate the regression
2009 Aug 02
1
Alternatives to rbind()
I'm not sure if there are better methods to create objects such as
dataframes with other than rbind function.
II usually combine a data.frames created at each loop with a rbind(),
specially when I don't know the dimension of the data.frame that will be
created.
Binding the new to an existing data.frame seems to be the easiest way to
build an object that assemble data in a loop.
2007 Mar 21
1
rbind.data.frame reacts on levels without factor (PR#9578)
Full_Name: Lutz Prechelt
Version: 2.4.1
OS: Windows XP
Submission from: (NULL) (160.45.111.67)
I stack a number of data.frames using rbind.
Each of these dataframes has a column 'authorname', which is a factor
and a column author = unclass(authorname) as piecewise pseudonyms.
When using rbind to stack these dataframes, R warns about invalid factor levels
and inserts all NAs in the author
2007 Sep 07
2
Matlab's lsqnonlin
Hi! I'm translating some code from Matlab to R and I found a problem.
I need to translate Matlab's function 'lsqnonlin'
(http://www-ccs.ucsd.edu/matlab/toolbox/optim/lsqnonlin.html) into R,
and at the beginning I thought it would be the same as R's 'optim'. But
then I looked at the definition of 'lsqnonlin' and I don't quite see how
to make
2009 Oct 03
2
converting matrix of lists to a regular matrix
Take the following code:
foo <- list()
foo[[1]] <- list(a=1, b=2)
foo[[2]] <- list(a=11, b=22)
foo[[3]] <- list(a=111, b=222)
result <- do.call(rbind, foo)
result[,'a']
In this case, result[,'a'] shows a list. Is there a more elegant way such
that result is a "regular" matrix of vectors? I imagine there are manual
ways of going about this, but I was
2007 May 29
1
Estimate Fisher Information by Hessian from OPTIM
Dear All,
I am trying to find MLE by using "OPTIM" function.
Difficult in differentiating some parameter in my objective function, I
would like to use the returned hessian matrix to yield an estimate of
Fisher's Information matrix.
My question: Since the hessian is calculated by numerical differentiate, is
it a reliable estimate? Otherwise I would have to do a lot of work to
2005 Oct 05
2
eliminate t() and %*% using crossprod() and solve(A,b)
Hi
I have a square matrix Ainv of size N-by-N where N ~ 1000
I have a rectangular matrix H of size N by n where n ~ 4.
I have a vector d of length N.
I need X = solve(t(H) %*% Ainv %*% H) %*% t(H) %*% Ainv %*% d
and
H %*% X.
It is possible to rewrite X in the recommended crossprod way:
X <- solve(quad.form(Ainv, H), crossprod(crossprod(Ainv, H), d))
where quad.form() is a little
2005 May 30
3
rbind wastes memory
Hello everybody,
if I try to (r)bind a number of large dataframes I run out of memory because R
wastes memory and seems to "forget" to release memory.
For example I have 10 files. Each file contains a large dataframe "ds" (3500 cols
by 800 rows) which needs ~20 MB RAM if it is loaded as the only object.
Now I try to bind all data frames to a large one and need more than
2009 Jun 20
1
Maximum number of tables combined with rbind
Hello,
I have been using read.table to read data files into R, then rbind to
combine them into one table. The column headings are all identical, so it
should be straightforward, and it seems to be working well so far.
My question is: What is the maximum number of tables that can be combined
with rbind?
Is it driven by the number of rows in the tables, by a constraint with the
syntax of rbind