search for: studyno

Displaying 13 results from an estimated 13 matches for "studyno".

2017 Oct 14
2
Populate one data frame with values from another dataframe for rows that match
Dear @Rui Barradas, thank you for the solution. It works perfectly. On 13/10/2017, 23:35, "Rui Barradas" <ruipbarradas at sapo.pt> wrote: Hello, Try the following. myDF1$studyno <- as.character(myDF1$studyno) myDF2$studyno <- as.character(myDF2$studyno) i1 <- which(names(myDF1) == "pf_mcl") merge(myDF1[-i1], myDF2, by = "studyno") Hope this helps, Rui Barradas Em 13-10-2017 20:09, Kevin Wamae esc...
2017 Oct 14
0
Populate one data frame with values from another dataframe for rows that match
Hi Kevin, I think there are issues with Rui's proposed solution. For example, if there are rows in myDF1 which have a studyno which does not match any row in myDF2, then you will lose those rows. In your original request you said that you wanted to keep those rows. To demonstrate my point I need to modify your sample data. Specifically, I changed some studyno settings in myDF1, and also the entries of pf_mcl in myDF1. m...
2017 Oct 13
4
Populate one data frame with values from another dataframe for rows that match
I'm trying to populate the column ?pf_mcl? in myDF1 with values from myDF2, where rows match based on column "studyno" but the solutions I have found so far don't seem to be giving me the desired output. Below is a snapshot of the data.frames. myDF1 <- structure(list(studyno = c("J1000/9", "J1000/9", "J1000/9", "J1000/9", "J1000/9", "J1000/9&quot...
2017 Oct 13
0
Populate one data frame with values from another dataframe for rows that match
Hello, Try the following. myDF1$studyno <- as.character(myDF1$studyno) myDF2$studyno <- as.character(myDF2$studyno) i1 <- which(names(myDF1) == "pf_mcl") merge(myDF1[-i1], myDF2, by = "studyno") Hope this helps, Rui Barradas Em 13-10-2017 20:09, Kevin Wamae escreveu: > I'm trying to populate the c...
2017 Oct 15
1
Populate one data frame with values from another dataframe for rows that match
...lt;KWamae at kemri-wellcome.org> Cc: Bert Gunter <bgunter.4567 at gmail.com>, Rui Barradas <ruipbarradas at sapo.pt>, R-help <R-help at r-project.org> Subject: Re: [R] Populate one data frame with values from another dataframe for rows that match Your example used one distinct studyno in DF1 and one distinct pf_mcl in DF2. I think that makes it hard to see what is going on, but maybe I completely misunderstand the problem. In any case, let's redefine myDF1 and myDF2. Note that myDF1 contains a studyno not in myDF2 and vice versa. myDF1 <- structure(list(studyno = c(&q...
2017 Oct 14
2
Populate one data frame with values from another dataframe for rows that match
...ataframe for rows that match ?merge Bert On Oct 13, 2017 12:09 PM, "Kevin Wamae" <KWamae at kemri-wellcome.org<mailto:KWamae at kemri-wellcome.org>> wrote: I'm trying to populate the column ?pf_mcl? in myDF1 with values from myDF2, where rows match based on column "studyno" but the solutions I have found so far don't seem to be giving me the desired output. Below is a snapshot of the data.frames. myDF1 <- structure(list(studyno = c("J1000/9", "J1000/9", "J1000/9", "J1000/9", "J1000/9", "J1000/9&quot...
2017 Oct 14
0
Populate one data frame with values from another dataframe for rows that match
Your example used one distinct studyno in DF1 and one distinct pf_mcl in DF2. I think that makes it hard to see what is going on, but maybe I completely misunderstand the problem. In any case, let's redefine myDF1 and myDF2. Note that myDF1 contains a studyno not in myDF2 and vice versa. myDF1 <- structure(list(studyno = c(&q...
2017 Oct 13
0
Populate one data frame with values from another dataframe for rows that match
?merge Bert On Oct 13, 2017 12:09 PM, "Kevin Wamae" <KWamae at kemri-wellcome.org> wrote: > I'm trying to populate the column ?pf_mcl? in myDF1 with values from > myDF2, where rows match based on column "studyno" but the solutions I have > found so far don't seem to be giving me the desired output. > > Below is a snapshot of the data.frames. > > myDF1 <- structure(list(studyno = c("J1000/9", "J1000/9", "J1000/9", > "J1000/9", > "...
2018 Feb 21
7
alternative for multiple if_else statements
...quot;site_1", "site_1", "site_1", "site_1", "site_1", "site_1", "site_1", "site_1", "site_1", "site_1", "site_1", "site_1", "site_1", "site_1", "site_1"), studyno = c("child_1", "child_1", "child_1", "child_1", "child_1", "child_1", "child_1", "child_1", "child_1", "child_1", "child_1", "child_1", "child_1", "child_1", &...
2018 Feb 26
0
alternative for multiple if_else statements
..., year, sep="_") ? If that is not what you're looking for (eg because 'year' is the observation year and not the study start year), perhaps something that picks the minimum year for a subject or other relevant group might work? For example paste("survey", ave(year, studyno, FUN=min), sep="_") S Ellison > -----Original Message----- > From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Kevin > Wamae > Sent: 21 February 2018 20:34 > To: R-help at r-project.org > Subject: [R] alternative for multiple if_else statements >...
2018 Feb 22
0
alternative for multiple if_else statements
...1", "site_1", "site_1", "site_1", "site_1", "site_1", > "site_1", "site_1", "site_1", "site_1", "site_1", "site_1", "site_1", > "site_1", "site_1"), studyno = c("child_1", "child_1", "child_1", > "child_1", "child_1", "child_1", "child_1", "child_1", "child_1", > "child_1", "child_1", "child_1", "child_1", "child_...
2018 Feb 22
0
alternative for multiple if_else statements
...1", "site_1", "site_1", "site_1", "site_1", "site_1", > "site_1", "site_1", "site_1", "site_1", "site_1", "site_1", "site_1", > "site_1", "site_1"), studyno = c("child_1", "child_1", "child_1", > "child_1", "child_1", "child_1", "child_1", "child_1", "child_1", > "child_1", "child_1", "child_1", "child_1", "child_...
2009 Dec 04
1
z to r transformation within print.rma.uni and forest from the package metafor
...zes as the raw data. (By the way: Really a nice piece of work, Wolfgang! Thanks heaps.) I specified the "rma.uni' function so that it looks like this: MAergebnis<-rma.uni(ri=PosOutc, ni=N, mods=NULL, data=dm, intercept=TRUE, slab=c(dm$Article, dm$StudyNo), subset=NULL, measure="ZCOR", add=1/2, to="only0", vtype="LS", method="DL", weighted=TRUE, level=95, digits=4, btt=NULL, tau2=NULL, knha=FALSE, control=list()) With PosOutc being the column containing th...