Displaying 20 results from an estimated 10000 matches similar to: ""renaming" dataframe1 using "column" names from dataframe2?"
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 (i in seq(1:nrow(dataframe1))) {
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
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
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
Date
1/1/2010
1/18/2010
Dataframe2
Date
2018 Mar 12
0
subsetting comparison problem
> On Mar 11, 2018, at 3:32 PM, Neha Aggarwal <aggarwalneha2000 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
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 =
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]]
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]]
2010 Nov 09
2
new column from column in another df
If I have a data frame where a species occupies several rows with different
phases such as (both col's ar factors):
species,phase
Populus tremula,1
Populus tremula,2
Populus tremula,3
Calluna vulgaris,1
Calluna vulgaris,2
Betula alba,1
Betula alba,2
Betula alba,3
Primula veris,1
Primula veris,2
and another df where each species only have one row:
species,growth_form
Populus tremula,tree
Acer
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
2007 Feb 23
2
Extracting a subset from a dataframe
Good day everyone,
Can anyone suggest an effective method to solve
the following problem:
I have 2 dataframes D1 and D2 as follows:
D1:
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-22:15:00 11.3 13 95
2005-10-23:12:00 12.3 13 2
2005-10-24:15:00 10.3 2 95
2005-10-25:15:00 10.3 2 2
D2:
2000 Mar 07
3
Merging data.frames
On Tuesday, March 07, 2000 5:40 PM, Richard Bilonick 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
2004 Aug 26
4
Column names of a data frame
I'm coming out with all the classic problems today ;-)
Can anyone tell me how to change the column names of an already existing
data frame? I've read the docs for ?data.frame and ?as.data.frame but
can't figure it out.
I want to make a new data.frame from some of the columns of an existing
data.frame, but when I do that, the new data.frame columns have the same
names as the old
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, ...
2010 Sep 14
3
how to compute when row length is different
hi guys..please help me with this
i am working on two data frames
one goes like this:
DF1
Sample_id RepairHours Denatured Dose ZeroMean FourtyFiveMean NinetyMean
1 SDM071 0 1 B 60.5 19.0 45.0
2 SDM071 1 1 B 46.0 23.0 42.5
3 SDM071 2 1 B 52.5 24.0 40.0
4 SDM071
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
2011 Mar 28
2
GSoC 2011 Weighting Schemes
Hi, guys
I am Wenjin from Graduate School of Chinese Academy of Science, pursing a
master degree and my current research interests including using Data mining
and Information retrieve technology to analysis software engineering (SE)
data and support SE.
I have great interested in "Weight Schemes" project. and in the last few
days I have learnt some detail about DFR model family by
2008 Apr 15
1
Predicting ordinal outcomes using lrm{Design}
Dear List,
I have two questions about how to do predictions using lrm, specifically
how to predict the ordinal response for each observation *individually*.
I'm very new to cumulative odds models, so my apologies if my questions are
too basic.
I have a dataset with 4000 observations. Each observation consists of
an ordinal outcome y (i.e., rating of a stimulus with four possible
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
2007 Mar 23
2
concatenate 2 data.frames
Dear all,
I would like to know how can I concatenate 2 data.frames into a single one. Both data frames have the same number of columns and the same class type in each correspondent column. So what I want is to have a new data.frame where I have first the values from one data.frame and then the values from a second data.frame would came after in this new data.frame.
Thanks in advance.
Med