Displaying 20 results from an estimated 30000 matches similar to: "question about cbind()"
2006 Jul 31
4
question about dataframe ("sensory") in PLS package
Dear all,
I am trying to my dataframe for the PLS analysis using the PLS package.
However I have some trouble generating the correct dataframe. The main
problem is how to use one name to represent several columns in the
dataframe.
The example dataframe in PLS package is called "sensory". I cannot
directly read the data file since it's a binary file. If I use
2006 Aug 21
4
question about 'coef' method and fitted_value calculation
Dear all,
I am trying to calculate the fitted values using a ridge model
(lm.ridge(), MASS library). Since the predict() does not work for lm.ridge
object, I want to get the fitted_value from the coefficients information.
The following are the codes I use:
fit = lm.ridge(myY~myX,lambda=lamb,scales=F,coef=T)
coeff = fit$coef
However, it seems that "coeff" (or "fit$coef") is
2004 Sep 06
4
how to add error bar to the data in R?
Dear all,
Does anyone knwo how to add error bar to the data point in a simple
xyplot? Right now, I have a .dat file including both the data points and
their standard deviation and read it in R. I tried function arrows(). But
it didn't gave me any arrows.
Thanks for the help!
Jeny
2010 Nov 23
2
Reading parts of data files
Dear,
I'm doing analysis where I need to work on relatively large (50-60 MB)
text files, though I'm really interested only in parts with binary
variables (named indicators1, indicators2, ... etc.)
Every text file contains other numeric columns, but not always the same
and not always in the same order - therefore I would rather need a
method connecting to file and reading only colums with
2007 Nov 13
2
cbind function
Hello everyone,
I would like to use the "cbind" function to construct a dataset, combining
some variable I defined before.
The codes are something like
var1 <- ...
var2 <- ...
var2 <- ...
...
data <- cbind(var1,var2,var3...)
The problem is I would like some flexibity in the data, i.e. the number of
the variables are not fixed. Is there a method of combine the uncertain
2015 Jan 24
3
Proper way to define cbind, rbind for s4 classes in package
Hi all,
this question has already been posted on stackoverflow, however without
success, see also
http://stackoverflow.com/questions/27886535/proper-way-to-use-cbind-rbind-with-s4-classes-in-package.
I have written a package using S4 classes and would like to use the
functions rbind, cbind with these defined classes.
Since it does not seem to be possible to define rbind and cbind directly
as S4
2015 Jan 26
2
Proper way to define cbind, rbind for s4 classes in package
>>>>> Michael Lawrence <lawrence.michael at gene.com>
>>>>> on Sat, 24 Jan 2015 06:39:37 -0800 writes:
> On Sat, Jan 24, 2015 at 12:58 AM, Mario Annau
> <mario.annau at gmail.com> wrote:
>> Hi all, this question has already been posted on
>> stackoverflow, however without success, see also
>>
2015 Feb 02
2
Proper way to define cbind, rbind for s4 classes in package
>>>>> Michael Lawrence <lawrence.michael at gene.com>
>>>>> on Sun, 1 Feb 2015 19:23:06 -0800 writes:
> I've implemented the proposed changes in
> R-devel. Minimally tested, so please try it. It should
> delegate to r/cbind2 when there is at least one S4
> argument and S3 dispatch fails (so you'll probably want to
2015 Feb 09
2
Proper way to define cbind, rbind for s4 classes in package
Are you able to create a reproducible example, somehow?
Thanks,
Michael
On Mon, Feb 9, 2015 at 2:28 PM, Mario Annau <mario.annau at gmail.com> wrote:
> Hi Michael,
> I've tested your change in r67699 (using r67773) and the function now
> correctly dispatches to r/cbind2 within the R-session without
> bind_activation(TRUE). However, running unit tests using R CMD check I
2015 Feb 20
1
Proper way to define cbind, rbind for s4 classes in package
>>>>> Mario Annau <mario.annau at gmail.com>
>>>>> on Wed, 11 Feb 2015 20:18:53 +0100 writes:
> sorry - I just got irritated by my different R-versions.
> The behaviour I described in the previous mail was discovered using R
> 3.1.2 without bind_activation(TRUE). In r67773 all calls are delegated
> to r/cbind.matrix and not
2009 Jul 14
1
From list to variable name
Hello
I am trying to run equations with different combinations of explanatory variables. I have managed to figure?out how to generate?the different combinations, and am trying to set up equations where I use these combinations. And this is where I?am getting stuck. I have searched several R websites but with no success.
This is how I generate the different combinations of my explanatory variables
2005 Oct 21
1
Generalised rbind/cbind
Dear list,
Is there a generalised form of rbind/cbind for combining
matrices/arrays into higher-D structures? ie. if I have:
a <- matrix(2,2,2)
b <- matrix(3,2,2)
how can I get
array(rep(c(3,2), each=4), c(2,2,2))
?
It seems like this would be the job of a generalised abind function:
abind(a,b, along=1) == rbind(a,b)
abind(a,b, along=2) == cbind(a,b)
abind(a,b, along=3)
2008 Feb 08
2
When I cbind the POSIXct gets lost
I would like to create a new dataframe from the DateTime column of an
existing dataframe and a numeric vector. When I do cbind(x[,1], y) the
result is:
[1,] 1199370600 12.500
[2,] 1199371200 69.375
[3,] 1199371800 23.750
where the first column you see used to look like:
"2008-01-03 08:30:00 Central Standard Time"
"2008-01-03 08:40:00 Central Standard Time"
2004 Mar 27
2
cbind question
hi, all:
Just wonder if there is any suggestions in how to get around this cbind error. I created two character lists with identical length. First tried combine the lists together with cbind, then convert the lists to matrix, and tried again. Both faied. Any fix to merge the two lists/matrices?
ll<- multiget(ftID, hgu95av2LOCUSID)
> class(ll)
[1] "list"
> sym <-
2009 Apr 09
1
HELP to cbind several data.frame with a LOOP
Dear R users,
thank for help. SORRY I am seeing in google a maillist but I didn't find a
solution for my problem
I have several txt file (with the same number of column and HEADER) to merge
together, this is an example:
Tableanalysis_firenze_10.txt
Tableanalysis_firenze_20.txt
Tableanalysis_firenze_30.txt
Tableanalysis_firenze_40.txt
Tableanalysis_firenze_50.txt
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]]
2008 Nov 20
5
summary statistics into table/data base, many factors to analyse
Dear list,
I reduced my data to the following:
x <- c(1,4,2,6,8,3,4,2,4,5,1,3)
y <- as.factor(c(2,2,1,1,1,2,2,1,1,2,1,2))
z <- as.factor(c(1,2,2,1,1,2,2,3,3,3,3,3))
I can produce the statistical summary just fine.
s1 <- tapply(x, y, summary)
d1 <- tapply(x, y, sd)
s2 <- tapply(x, z, summary)
d2 <- tapply(x, z, sd)
First thing:
I have 100 plus factors to analyse. Theirs
2012 May 25
3
Multiple cbind according to filename
Hi all,
I'm just a beginner with R but I have not been able to search for any
relevant answer to my problem. I apologize if it has in fact been asked
before.
Recently I've realized that I need to combine hundreds of pairs of data
frames. The filenames of the frames I need to combine have unique strings.
This is my best guess as to the approach to take:
filenames<-list.files()
2010 May 01
1
cbind and automatic type conversion
Hello,
I have three method types and 100 generalization errors for each, all in the range [0.65,0.81]. I would like to make a stacked histogram plot using ggplot2 with this data ...
Therefore I need a data frame of the form e.g.
Method GE
---------- ------
"Classic" 0.76
"Classic" 0.79
"Own
2012 Jul 10
1
cbind and cbind.data.frame
## Hi, I'm having trouble understanding how the cbind function decides what
method to apply to its arguments. Easy cut and paste code below.
>
>
>
> ## create two columns
> c1 <- c("A","A","B","B")
> c2 <- 1:4
>
> ## cbind outputs a matrix with elements that are characters, seems
reasonable
> out <-