Displaying 5 results from an estimated 5 matches for "sandk".
Did you mean:
sands
2009 Jan 29
4
Text in a character vector to indicate "ifelse" argument
Hello
I have a data set that looks like this;
> b2
dato chr status PRRSvac
PRRSsanVac PRRSsanDk PRRSdk
33 2007-12-03 090432 R?d SPF
34 2007-02-09 090432 R?d SPF+sanDK
35 2002-12-17 090432 R?d SPF+DK
36 2002-11-27 090432 R?d SPF+sanDK
37 2002-07-23 090432 R?d SPF+DK
38 200...
2009 Jan 26
2
Getting data from a PDF-file into R
...on a particular date. And the same with
"PRRS-pos VAC" or "Vac" presented by a 1 in the colum PRRS-VAC, and
"PRRS-pos DK" or "DK" presented by a 1 in the colum PRRS-DK. And also with
"sanVAC" there should be a 1 in the colum VACsan, and with "sanDK" there
should be a 1 in the colum DKsan. The first date for each "CHR-nr" should
either be the earliest date ne the red box (as in the first picture), or the
date with word "f?r" before the date (as in the second picture). All the 200
PDF-documents looks like the ones in th...
2009 Feb 13
2
extracting parts of words or extraxting letter to use in ifelse-func.
...now how
to do it.
I want to make these five variables;
b2$PRRSvac <- ifelse(b2$status=='A' | b2$status=='Aa',1,0)
b2$PRRSdk <- ifelse(b2$status=='B' | b2$status=='Bb',1,0)
b2$sanVac <- ifelse(b2$status=='C' | b2$status=='sanAa',1,0)
b2$sanDk <- ifelse(b2$status=='D' | b2$status=='sanBb',1,0)
b2$totalvac <- ifelse(b2$status=='San',1,0)
And
b2$UGT <- ifelse(b2$status=='UGT',1,0)
b2$KOM <- ifelse(b2$status=='KOM',1,0)
But, as one from this forum told me, it doesn't work beca...
2009 Feb 13
0
Odp: Odp: extracting parts of words or extraxting letter to use in ifelse-func.
...;
> >> b2$PRRSvac <- ifelse(b2$status=='A' | b2$status=='Aa',1,0)
> >> b2$PRRSdk <- ifelse(b2$status=='B' | b2$status=='Bb',1,0)
> >> b2$sanVac <- ifelse(b2$status=='C' | b2$status=='sanAa',1,0)
> >> b2$sanDk <- ifelse(b2$status=='D' | b2$status=='sanBb',1,0)
> >> b2$totalvac <- ifelse(b2$status=='San',1,0)
> >
> > Basically you do not need ifelse
> >
> > b2$status=='San'
> >
> > gives you logical vector and you can...
2009 Jan 28
2
t.test in a loop
Hi All,
I've been having a little trouble with creating a loop that will run a a
series of t.tests for inspection,
Below is the code i've tried, and some checks i've looked at.
I've used the get(paste()) idea as i was told previously that the use of the
eval should try and be avoided.
I've run a single syntax to check that my systax is correct and works
without any problems