1
Jon Erik Ween, MD, MS
Scientist, Kunin-Lunenfeld Applied Research Unit
Director, Stroke Clinic, Brain Health Clinic, Baycrest Centre
Assistant Professor, Dept. of Medicine, Div. of Ne
is then
translated into a z-score in a second table. My DSTz table combines these two
steps, going from the raw score to the tabulated age-adjusted z-score that was
calculated based on a normative sample by the WMS-R folks.
Jon
Soli Deo Gloria
Jon Erik Ween, MD, MS
Scientist, Kunin-Lunenfeld
mailto:r-help-boun...@r-project.org] On Behalf Of Jon Erik Ween
>> Sent: Thursday, December 09, 2010 8:27 AM
>> To: David Winsemius
>> Cc: r-help@r-project.org
>> Subject: Re: [R] set dataframe field value from lookup table
>>
>> Sorry, I should have included
object length is not a multiple of shorter object length
So, regardless of how you calculate [r,c], the step
df$DSTz<-DSTzlook[r,c]
doesn't work. I've tried various permutations with "apply", but that didn't
work either. Any suggestions?
Jon
Soli Deo Gloria
Jon Eri
But it is the indirect referencing of the lookup in the main table that causes
me trouble.
Jon
Soli Deo Gloria
Jon Erik Ween, MD, MS
Scientist, Kunin-Lunenfeld Applied Research Unit
Director, Stroke Clinic, Brain Health Clinic, Baycrest Centre
Assistant Professor, Dept. of Medicine, Div. of Neu
.8 2.6 2.6
27 0.0 0.5 1.0 1.8 2.6 2.6
26 -.5 0.0 0.0 1.0 1.8 2.6
.
.
.
.
So, if a subject (row) has age==29 and a standard score of 28, the value should
be 1.8, etc.
Thanks
Jon
Soli Deo Gloria
Jon Erik Ween, MD, MS
Scientist, Kunin-Lunenfeld Applied Research Unit
Director, Strok
Hi
This is (hopefully) a bit more cogent phrasing of a previous post. I'm
trying to compute a z-score to rows in a large dataframe based on values in
another dataframe. Here's the script (that does not work). 2 questons,
1) Anyone know of a more elegant way to calculate the "rounded" age value
t
Hi!
I have a large dataset where I need to recompute a value in each row based
on z-sores from another look-up table. The look-up table is arranged by raw
score in the first column and age in the first row, eg:
20 30 40
1 .3 .5 .7
2 .2 .3 .4
3 .1 .4 .7
the main matrix will have ages
[[j]], MSsmv$Issue_cat); # Don't put any real
results here, they don't seem to be passed back
perf<-performance(pred,"auc");
}
###
Cheers
Jon
Soli Deo Gloria
Jon Erik Ween, MD, MS
Scientist, Kunin-Lunenfeld Applied Research Unit
Director, Stroke Clinic, Brai
be welcome. Thanks!
Jon
Soli Deo Gloria
Jon Erik Ween, MD, MS
Scientist, Kunin-Lunenfeld Applied Research Unit
Director, Stroke Clinic, Brain Health Clinic, Baycrest Centre
Assistant Professor, Dept. of Medicine, Div. of Neurology
University of Toronto Faculty of Medicine
Kimel Family Build
The @ operator is defined for slots of *S4* classes.
Best,
Uwe Ligges
> Hence, you pull out the the auc value in ROCR-"performance" by p...@y.value
> in the script. you can see what slots are in an object by simply listing the
> object contents at the command line>obje
ommand line >object.
Thanks again for all the help!
Jon
Soli Deo Gloria
Jon Erik Ween, MD, MS
Scientist, Kunin-Lunenfeld Applied Research Unit
Director, Stroke Clinic, Brain Health Clinic, Baycrest Centre
Assistant Professor, Dept. of Medicine, Div. of Neurology
Un
David
Thanks for your suggestions. "Reproducible examples", my datasets are too
big so I'm not sure what you would want to see. Anyway, does this help:
dataset:
Perf_Index Age risk_score gender hight IQ ...
12 78 10 m 6 110 ...
10 77 9 f 6 97 ...
5 64 f 13 5 120 ...
...
varslist:
Perf_Index Ag
ve
tried space separated, comma separated, tab separated lists and all give the
same error. I've tried get(), parse()... no go.
Any suggestions?
Thanks a lot
Jon
Soli Deo Gloria
Jon Erik Ween, MD, MS
Scientist, Kunin-Lunenfeld Applied Research Unit
Director, Stroke Clinic, Brain Hea
#Example script
varlist<-read.table(/path/to/varlist)
for (i in 1:length(varlist)){
res<-mean(Dataset$SOMETHINGHERE_i )
write(res) somewhere
}
Something like that. Any suggestions?
Thanks
Jon
Soli Deo Gloria
Jon Erik Ween, MD, MS
Scientist, Kunin-Lunenfeld Applied Re
Hi!
I have a dataset with some 300+ variables and 2000+ records. I'd like to grind
through a bunch of analyses on the variables by using a script, but can't
figure out how to refer to variable names properly. For some of the simpler
stuff I use various "apply" functions, but for others (like t-tes
Thanks Jim
That got me there. I suppose R prefers absolute field references in
scripts rather than macrosubstitutions of field names like you would
do in pearl or shell scripts?
Anyway, thanks for you help.
Cheers
Jon
Soli Deo Gloria
Jon Erik Ween, MD, MS
Scientist, Kunin-Lunenfeld
a row. I guess
you could do
Dataset.target <- apply(x,1,function(.row) sum(is.na(.row)))
Thanks
Jon
Soli Deo Gloria
Jon Erik Ween, MD, MS
Scientist, Kunin-Lunenfeld Applied Research Unit
Director, Stroke Clinic, Brain Health Clinic
Baycrest Centre for Geriatric Care
Assistant Professor,
nd
ABCtaskNum) in the function declaration either, but then I haven't
quite figured out how best to do variable substitutions in R.
Thanks for any help. Cheers
Jon
Soli Deo Gloria
Jon Erik Ween, MD, MS
Scientist, Kunin-Lunenfeld Applied Research Unit
Director, Stroke Clinic, Brain Heal
19 matches
Mail list logo