similar to: order two dataframes by an integer column from either data frame

Displaying 20 results from an estimated 4000 matches similar to: "order two dataframes by an integer column from either data frame"

2011 Oct 07
2
Merge dataframes
Hello, I am having some problems to use the 'merge' function. I'm not sure if I got its working right. What I want to do is: 1) Suppose I have a dataframe like: height width 1 1.1 2.3 2 2.1 2.5 3 1.8 1.9 4 1.6 2.1 5 1.8 2.4 2) And I generate a second
2010 Sep 16
1
advice on writing/maintaining an R package with a version control system
Dear all, As I resume my dissertation work next month, I'd like to actually start an R package this time around. I haven't done so because I update my code very often (still in development phase), so running the skeleton function, running checks, building, and re-installing the package onto the system seemed like a long and tedious process. I would like to hear your experience on how
2007 Nov 19
1
mulitmodal distributions
Hello, I see that "mclust" is a pacakge that handles fitting mixtures of normals. Are there any other packages out that that can handle mixtures of gammas or other exponentials? Additionally, are there any packages out there that can fit bimodal distributions without mixtures? i.e., Cobb et al. 1983 using moment recursion relations? Thank you! mw Marion Wittmann, Ph.D.
2010 Dec 07
4
Creating binary variable depending on strings of two dataframes
Hi, consider the following two dataframes: x1=c("232","3454","3455","342","13") x2=c("1","1","1","0","0") data1=data.frame(x1,x2) y1=c("232","232","3454","3454","3455","342","13","13","13","13")
2008 May 14
2
dataframes to a list
Hi R, I have the data frames, data1, data2....data50. Now I want to put all of these in a single list. But, >list(data1, data2,.........data50) is very big to write. How do I then do it? Thanks, Shubha This e-mail may contain confidential and/or privileged i...{{dropped:13}}
2011 Oct 02
2
subset in dataframes
I need help in subseting a dataframe: data1<-data.frame(year=c(2001,2002,2003,2004,2001,2002,2003,2004, 2001,2002,2003,2004,2001,2002,2003,2004), firm=c(1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4),x=c(11,22,-32,25,-26,47,85,98, 101,14,87,56,12,43,67,54), y=c(110,220,302,250,260,470,850,980,1010,140,870,560,120,430,670,540)) data1 I want to keep the firms where all x>0 (where there are
2008 Jan 07
0
Help with flexmix
Hello, I am using the package "flexmix", specifically the function "stepFlexmix" and was hoping for some assistance: Here is my input: fit <- stepFlexmix(trips~.,data=data.frame(traveldata),k=1:5,nrep=5,model=FLXMRglm( family="gaussian")) And I recieve the following error message: *Error in FLXfit(model = model, concomitant = concomitant, control =
2007 Nov 20
0
try FlexMix RE: mulitmodal distributions
Hi, Marion, I believe the package FlexMix provides a more generalized version of finite mixture modeling than is found in mclust/mclust02. Please see: http://cran.r-project.org/doc/vignettes/flexmix/flexmix-intro.pdf Karen --- Karen M. Green, Ph.D. Karen.Green@sanofi-aventis.com Research Investigator Drug Design Group Sanofi Aventis Pharmaceuticals -----Original Message-----
2009 Nov 13
2
why the same values cannot be judged to be the same in R
Hi Rusers, I found sometimes that the same values cannot be judged to be the same in R. Anybody knows the probelm? I think i ignored some minor detail. Thanks. Here is the example. ############ data1<-matrix(data=c(1,1.2,1.3,"3/23/2004",1,1.5,2.3,"3/22/2004",2,0.2,3.3,"4/23/2004",3,1.5,1.3,"5/22/2004"),nrow=4,ncol=4,byrow=TRUE)
2023 Jun 11
1
Problem with filling dataframe's column
Dear Rui; Many thanks for your email. I used one of your codes, "data2$LU[which(data2$Layer == "Level 12")] <- "Park"", and it works correctly for me. Actually I need to expand the codes so as to consider all "Levels" in the "Layer" column. There are more than hundred levels in the Layer column. If I use your provided code, I have to write it
2023 Jun 11
1
Problem with filling dataframe's column
?s 22:54 de 11/06/2023, javad bayat escreveu: > Dear Rui; > Many thanks for your email. I used one of your codes, > "data2$LU[which(data2$Layer == "Level 12")] <- "Park"", and it works > correctly for me. > Actually I need to expand the codes so as to consider all "Levels" in the > "Layer" column. There are more than hundred
2023 Jun 11
1
Problem with filling dataframe's column
?s 21:05 de 11/06/2023, javad bayat escreveu: > Dear R users; > I am trying to fill a column based on a specific value in another column of > a dataframe, but it seems there is a problem with the codes! > The "Layer" and the "LU" are two different columns of the dataframe. > How can I fix this? > Sincerely > > > for (i in 1:nrow(data2$Layer)){ >
2008 Nov 05
2
how can I save the estimates of a regression model in a file?
Dear all I need some help with R. How can I save the estimates of a regression model in a file? here is what I did: 1) this is my regression model: fit1 <- lm(logmilk ~ logdays + days, data=data2) 2) however, I want to get the parameters estimates for each individual (by group): so i did the following: by(data2, list(data2$V2),function(.data2) lm(logmilk ~ logdays + days, data= .data2)) 3)
2011 Jul 16
1
Fwd: construct boxplots from data with varying column widths
From: David Winsemius <dwinsemius at comcast.net> On Jul 16, 2011, at 12:15 PM, Rory Campbell-Lange wrote: > On 16/07/11, David Winsemius (dwinsemius at comcast.net) wrote: >> >> On Jul 16, 2011, at 11:19 AM, Rory Campbell-Lange wrote: >> >>> I'm an R beginner, and I would like to construct a set of boxplots >>> showing database function runtimes.
2009 Nov 27
2
If condition using accessors
Hi, I'm quite new using R and have got no one to help me get through it. Hopefully someone can help me with one problem I've been struggling with for the last hours!! (Sorry if I'm using the wrong terminology as well!) I have a data matrix in which SIE is one of my variables. What I need to do now is to create a new variable (group) if a certain condition in SIE is met. I tried:
2011 Nov 16
3
plotting a double y axis when x and y lengths differ
Hello All, Many thanks to the help I have received so far. Here is an example data set I hope to plot Data1 Year Data SE 1 2005 2 0.01 2 2006 4 0.01 3 2007 5 0.01 4 2008 2 0.01 5 2009 3 0.01 6 2010 6 0.01 Data2 Year Data SE 1 2006 32 1 2 2007 100 2 3 2008 60 4 4 2009 67 3 5 2010 8 1 Notice Data2 has one less years worth of data than Data1 (which is my
2008 Aug 21
1
problem merging two data sets ( one with a header and one without)
I have two set of data, Data1 and Data2 . Data1 has a header and Data2 does not. I would like to merge the two data sets after removing some columns from data2 . I am having a problem merging so I had to write and read final data and specify the ?header=F? so the merge can be done by?V1?. Is there a way to avoid this step. The problem is when I do cbind the FinalData has different column names
2010 Sep 06
1
combining collumns for data.frames
Hi This question is far less simple than the title suggests, please read carefully, thanks. I have 2 sets of data, both read into R >data1<-read.table ("1.txt", header=T, sep="\t") >data2<-read.table ("2.txt", header=T, sep="\t") >data1 Taxon stage1 stage2 stage3 stage4 T1 0 0 1 1 T2 0
2009 Nov 06
1
probem on merge data
Hi there, data1<-matrix(data=c(1,1.2,1.3,"3/23/2004",1,1.5,2.3,"3/22/2004",2,0.2,3.3,"4/23/2004",3,1.5,1.3,"5/22/2004"),nrow=4,ncol=4,byrow=TRUE) data1<-data.frame(data1) names(data1)<-c("areaid","x","y","date") data1 areaid x y date 1 1 1.2 1.3 3/23/2004 2 1 1.5 2.3 3/22/2004 3 2
2004 Feb 04
5
Date Time Conversion problems...
At one time (version 1.7), the code below used to work for converting and extracting based on the Date Time. In version 1.8.1, something changed I know, but I cannot for the life of me figure out what... Data: UserName,RequestDate,PO,OrderDate,ExpDelivDate,Vendor,Total "Woody, Jim",12/19/2002,AP15063,1/7/2003,2/10/2003,Ames ,8570 "Harrold,