eference/mutate-joins.html
https://statisticsglobe.com/r-dplyr-join-inner-left-right-full-semi-anti
Regards,
Tim
-Original Message-
From: R-help On Behalf Of Jeff Newmiller
Sent: Thursday, March 10, 2022 11:25 AM
To: r-help@r-project.org; Ivan Calandra ;
R-help
Subject: Re: [R] condition
AM
To: r-help@r-project.org; Ivan Calandra ; R-help
Subject: Re: [R] conditional filling of data.frame - improve code
[External Email]
Use merge.
expts <- read.csv( text =
"expt,sample
ex1,sample1-1
ex1,sample1-2
ex2,sample2-1
ex2,sample2-2
ex2,sample2-3
", header=TRUE, as.is=TRUE )
h 10, 2022 11:25 AM
To: r-help@r-project.org; Ivan Calandra ; R-help
Subject: Re: [R] conditional filling of data.frame - improve code
[External Email]
Use merge.
expts <- read.csv( text =
"expt,sample
ex1,sample1-1
ex1,sample1-2
ex2,sample2-1
ex2,sample2-2
ex2,sample2-3
",
Use merge.
expts <- read.csv( text =
"expt,sample
ex1,sample1-1
ex1,sample1-2
ex2,sample2-1
ex2,sample2-2
ex2,sample2-3
", header=TRUE, as.is=TRUE )
mydata <- data.frame(sample = c("sample2-2", "sample2-3", "sample1-1",
"sample1-1", "sample1-1", "sample2-1"))
merge( mydata, expts, by="sample",
4 matches
Mail list logo