search for: dataframe1

Displaying 20 results from an estimated 29 matches for "dataframe1".

Did you mean: dataframes
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...
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...
2008 Oct 22
3
Substitute problem
hello R users, I didn't find a solution for a special problem. 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 ro...
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
2011 Aug 22
2
Extracting columns with specific string in their names
Hi, Let's say that I have a set of column names that begin with the string "Xyz". How do I extract these specific columns? I tried to do the following: dataframe1[,grep("Xyz",colnames(dataframe1))] But it does not work. What is wrong with my expression?
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 =...
2018 Mar 12
0
subsetting comparison problem
...ggarwalneha2000 at gmail.com> wrote: > > Hello All, > I am facing a unique problem and am unable to find any help in R help pages > or online. I will appreciate your help for the following problem: > I have 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 : >...
2018 Mar 11
4
subsetting comparison problem
Hello All, I am facing a unique problem and am unable to find any help in R help pages or online. I will appreciate your help for the following problem: I have 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...
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]]
2009 May 10
1
Select the rows in a dataframe that matches a criteria in another dataframe
Hi everyone! Thank you for the help you have been given to me, and here I'm with another problem with my dataframes: I have two dataframes (with much more observations), like these: Dataframe1 Firm Year cash 500400200 2007 100 500400200 2006 200 500400200 2005 400 500400300 2007 300 500400300 2006 240 500400300 2005 120 500400400 2007 340 500400400 2006 890 500400400 2005 250 Dataframe 2 Firm Audited...
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.fra...
2006 Feb 24
3
Sorting alphanumerically
I'm trying to sort a DATAFRAME by a column "ID" that contains alphanumeric data. Specifically,"ID" contains integers all preceeded by the character "g" as in: g1, g6, g3, g19, g100, g2, g39 I am using the following code: DATAFRAME=DATAFRAME[order(DATAFRAME1$ID),] and was hoping it would sort the dataframe by ID in the following manner g1, g2, g3, g6, g19, g39, g100 but it doesn't sort at all. Could anyone point out my mistake? Thank you. Mark
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]]
2000 Mar 07
3
Merging data.frames
...ck wrote: >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,...
2009 Aug 09
3
howto get the number of columns and column names of multiply data frames
Hi, I' ve read in several files with measurements into R data frames(works flawlessly). Each dataframe is named by the location of measurement and contains hundreds of rows and about 50 columns like this dataframe1. date measurment_1 .... mesurement_n 1 2 3 .. .. .. n For further processing I need to check whether or not ncol and colnames are the same for all dataframes. Also I need to add a new column to each dataframe with contain the name of the dataframe, so that this column can be treated as factor...
2007 Feb 23
2
Extracting a subset from a dataframe
...ws wc pwc 2005-02-02:15:00 17.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 a...
2011 Jul 27
1
To Merge or to use Indicator Variables?
Greetings all, I have two sets of data that I would 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 l...
2010 Sep 14
3
how to compute when row length is different
...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 know its basic but i needhelp th...
2008 Apr 15
1
Predicting ordinal outcomes using lrm{Design}
...x2 --------------------------------------- 1 3 2.35 -1.07 2 2 1.78 -0.66 3 4 5.19 -3.51 ... 4000 1 0.63 -0.23 --------------------------------------- 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 o...
2012 Feb 09
2
Subset a datafram according to time
PREFERED WAY OF DOING IT I have a data set of observations every second for a month long period, I want to extract the observations according to the date & time of another data frame ( the other data frame is in the same format). I want to do this to match these observations to my test observations (in the other data frame) which are done every 6 minutes. So basically im shrinking the