Displaying 20 results from an estimated 27 matches for "dataframe2".
Did you mean:
dataframes
2008 Oct 22
3
Substitute problem
...m.
I have two dataframes.
dataframe1:
X value row col ID
1 8.973498062 5512625 3460000 1
2 11.656658570 5501625 3464000 2
3 11.121777570 5495625 3473000 3
4 9.310465964 5508625 3477000 4
5 8.883483845 5515625 3496000 5
dataframe2:
X value row col ID n
1 11.105009400 5511625 3463000 1 -619.112472616732
2 10.324148150 5499625 3465000 0 1.000000000000
3 8.744590903 5503625 3475000 0 1.000000000000
4 9.523473123 5494625 3475000...
2010 Feb 10
2
Subscripting
Dataframe1 contains a list of specific dates. Dataframe2 contains a large
dataset, one element of which is Date. How do I create a subset of
Dataframe2 that excludes the dates from Dataframe1? I know how to do it with
a left outer join vs null in SQL, but I can't figure out how to do it more
directly via the subcripts that already exist?
Dateframe1...
2009 Aug 06
1
problem with recording numeric output into another dataframe
dear all,
I have two dataframes
dataframe1
ID
a
b
c
dataframe2
ID value
a;W 100
X;c 200
Y;Z 300
I wanted to match the IDs from the two dataframes and record the values into
a new column of dataframe1 at the corresponding rows. This is what I expect:
dataframe1
ID value
a 100
b
c 200
I tried doing it like this:
for (...
2018 Mar 11
4
subsetting comparison problem
...e 2 data-frames, samples below and there is an expected output
R Dataframe1:
C1 C2 C3 C4...... CN
R1 0 1 0 1
R2 1 0 1 1
R3 1 0 0 0
.
.
.
RN
U Dataframe2 :
C1 C2 C3 C4...... CN
U1 1 1 0 1
U2 1 1 1 1
Expected Output:
U1 satisfies R1, R3
U2 satisfies R1, R2, R3
So this is a comparison of dataframes problem, with a subset dimension.
T...
2006 Mar 17
1
"renaming" dataframe1 using "column" names from dataframe2?
I have a dataframe named ?temp?, and another dataframe
named ?descriptions?.
I wish to ?rename? temp, and to ?call? it the names of
a certain column in the dataframe ?descriptions?.
Is there a good way to do this?
A similar question:
I am using a ?for loop? to create several new
dataframes.
e.g.
for(j in 1:9){
..
I?d like each dataframe to be named d1, d2, d3, with
the number being tied to
2013 Jan 25
2
How to name the elements of list
HI,
I have the array list:
X<-vector("list", 2)
X[[1]] : data frame 1
X[[2]]: dataframe2
now i want to change index 1 and 2 into: "0-10" , "11-20" ,.
finally I want to have
X[["0-10"]]:dataframe1
X[["11-20"]]:dataframe2
how do I get them?
Thanks a lot.
Kind regards,
Tammy
[[alternative HTML version deleted]]
2018 Mar 12
0
subsetting comparison problem
...put
>
> R Dataframe1:
> C1 C2 C3 C4...... CN
> R1 0 1 0 1
> R2 1 0 1 1
> R3 1 0 0 0
> .
> .
> .
> RN
>
> U Dataframe2 :
> C1 C2 C3 C4...... CN
> U1 1 1 0 1
> U2 1 1 1 1
>
>
> Expected Output:
> U1 satisfies R1, R3
> U2 satisfies R1, R2, R3
>
I don't think you have c...
2011 Jun 14
1
[Resolved] combine the data frames into comma separated list.
Hi
Thanks Gabor for your suggestion. I am posting the code that worked for me.
dataframe1 = data.frame(cbind(Src = c(1,1,1,2,3), Target1 =
c('aaa','bbb','ccc','aaa','ddd'))); #must be data frame
dataframe2 = data.frame(cbind(Src = c(2,3,4,4,4), Target2 =
c('aaaa','dddd','bbbb','eeee','ffff')));
dataframe3 = data.frame(cbind(Src = c(1,3,5,6,6), Target3 =
c('xx','yy','zz','tt','uu')));
dataframe4 = data.frame(cbind(Src = c(...
2008 Oct 27
3
Arrays of Trellis plots
hello,
the example below does not work. (i know it's not supposed, but it makes it
clear what i'm trying to achieve)
par(mfrow=c(2,1))
xyplot(y~x2|x1,data=dataframe1,pch=20)
xyplot(y~x2|x1,data=dataframe2,pch=20)
i know i could probably merge the two datasets and do something like
xyplot(y~x2|x1+dataset,data=merged)
any other suggestion?
thanks.
[[alternative HTML version deleted]]
2010 Nov 09
2
new column from column in another df
...imula veris,2,herb
This will be made for data frames a lot larger than this one so it needs to
be automated in some way.
Also, as you can see the second data frame contains more species than the
first one so I need to pick them out by name not only by row number...
(I tried something like:
subset(dataframe2.df,
dataframe2.df$species==as.character(unique(dataframe1.df$species)))
in a for loop but I got an error about different factor levels which is
true.)
Any help is very appreciated!
Jonas
--
View this message in context: http://r.789695.n4.nabble.com/new-column-from-column-in-another-df-tp303361...
2000 Mar 07
3
Merging data.frames
...>I need to merge several data.frames into one data.frame. In S-Plus I would
>use
>"merge" but I don't see a merge command in R. What is the best way to
>accomplish
>this?
The easiest way to to this, I think, is as follows:
if you have several data frames, dataframe1, dataframe2, . . . , dataframen,
you can merger them all into one dataframe by using the data.frame command
again with the individuaal data.frames as arguments:
data.frame(dataframe1, dataframe2, . . . , dataframen)
here's a quick example:
> a1_c(1, 1, 1)
> a2_c(2, 2, 2)
> b1_c(3, 3, 3)
> b...
2011 Apr 07
2
error reading data help please
...,
Sorry to bother you.
Have been try to read my data into R (something I have done in the past) but
having an error message with this one.
Any possible help please?
Thanks.
Oz
This is the error I am getting (please see bold):
> setwd("D:/Replication/")
>library(gmp)
> dataFrame2=read.table("data.txt",header=T)
Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,
:
line 1 did not have 58 elements
[[alternative HTML version deleted]]
2007 Feb 23
2
Extracting a subset from a dataframe
...5 5 96
2005-02-19:15:00 20.1 15 97
2005-02-20:18:00 16.5 95 95
2005-03-03:18:00 10.3 95 95
2005-03-04:00:00 13.4 13 95
2005-10-22:15:00 11.3 13 95
2005-10-25:15:00 10.3 2 2
I want to create another dataframe made up
of the values of dataframe1 which are not common
with dataframe2, ie. newD = D1 - (D1 intersection D2)
that is,
newD:
dates ws wc pwc
2005-10-19:12:00 10.8 80 81
2005-10-20:12:00 12.3 5 15
2005-10-21:15:00 12.3 3 15
2005-10-23:12:00 12.3 13 2
2005-10-24:15:00 10.3 2 95
Thanks for any help you can provide,
Augusto
--...
2007 Mar 27
1
Jackknife estimates of predict.lda success rate
...find any function that allows me to do this.
Any suggestions of how to generate the jackknife reclassification to
assess classification accuracy? (BTW, commands I used to generate
predictions appended below.)
Many thanks
Mat Vanderklift
> library(MASS)
> Sep04 <- read.table("Sep04 dataframe2.txt", header=TRUE)
> trainSep04 <- Sep04[1:125,]
> Sep04.lda <- lda(Reef ~ ., trainSep04)
> Sep04.lda
> predict.Sep04 <- predict(Sep04.lda, Sep04) $class
[[alternative HTML version deleted]]
2018 Mar 12
0
Subsetting comparison problem
...e 2 data-frames, samples below and there is an expected output
R Dataframe1:
C1 C2 C3 C4...... CN
R1 0 1 0 1
R2 1 0 1 1
R3 1 0 0 0
.
.
.
RN
U Dataframe2 :
C1 C2 C3 C4...... CN
U1 1 1 0 1
U2 1 1 1 1
Expected Output:
U1 satisfies R1, R3
U2 satisfies R1, R2, R3
So this is a comparison of dataframes problem, with a subset dimension.
T...
2018 Mar 12
0
Dataframe Subsetting comparison
...e 2 data-frames, samples below and there is an expected output
R Dataframe1:
C1 C2 C3 C4...... CN
R1 0 1 0 1
R2 1 0 1 1
R3 1 0 0 0
.
.
.
RN
U Dataframe2 :
C1 C2 C3 C4...... CN
U1 1 1 0 1
U2 1 1 1 1
Expected Output:
U1 satisfies R1, R3
U2 satisfies R1, R2, R3
So this is a comparison of dataframes problem, with a subset dimension.
T...
2011 Jul 27
1
To Merge or to use Indicator Variables?
...uld like to investigate. The first is
gene/genome related data given different 'cell-states'. The second set of
data is relates the genes to a biological pathway. /(I think in pictures so
here goes.)/
*dataframe1*
gene, cell-state1, cell-state2
gene1, x1, y1
gene2, x2, y2
gene.x, ..., ...
*dataframe2*
pathway1, gene-x1, gene-x2, ...
pathway2, gene-y1, gene-y2, ...
What I want to do is, see if 'cell-state1' (in-)activates different genes /
pathways from 'cell-state2.' Furthermore, I would like to test for
correlation /(t-test and maybe graphing)/ between the cell-states 1 Vs 2 f...
2010 Sep 14
3
how to compute when row length is different
...1 50 159 169
130
71 SDM053 1 1 100 113 126
110
72 SDM053 1 1 200 118 112
120
these are just part of the frames......
i have to subtract the first five values of dataframe2 from one value from
dataframe1
eg: subtract<-DF2$Day_0_Read1-DF1$ ZeroMean
if u notice the repair hours in both have to match...along with their id's.
i have tried this
zeroday_subtract1=DF1$Day_0_Read1 - DF2[DF1$RepairHours,]$ZeroMean
but it dosent work
please help me with this...i kno...
2002 Apr 30
1
data.frame package?
Is there a library that is able for example to
1. merge 2 dataframes by row eg.: rbind(dataframe1, dataframe2):data.frame
2. delete a column from a dataframe del(dataframe, colname) or
del(dataframe, colindex= 1):data.frame?
3. Select lines from a dataframe by a specific function ?
select(dataframe, func=small(x){x<1}, colindex=3): data.frame?
4. converting all double columns of a data.frame to a matr...
2008 Apr 15
1
Predicting ordinal outcomes using lrm{Design}
...-----
I get excellent fits using
fit1 <-lrm(y ~ x1+x2, data=my.dataframe1)
Now I want to see how well my model can predict y for a new set of 4000
observations. I need to predict y for each new observation *individually*.
I know an expression like
predicted1<-predict(fit1, newdata=my.dataframe2, type=""fitted.ind")
can give *probability* of each of the 4 possible responses for each
observation. So my questions are
(1) How do I pick the likeliest y (i.e., likeliest of the 4 possible
ratings) for each given new observation?
(2) Are there good reference that explain th...