search for: beeley

Displaying 11 results from an estimated 11 matches for "beeley".

2011 Aug 29
3
Basic question about re-writing for loop as a function
...he function to return, for the first column, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0 (because those are the values of Words which contain a 1) and for the second column return 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 (because the fifth value is the only one that contains a 2). Any suggestions gratefully received! Chris Beeley Institute of Mental Health, UK
2012 Dec 09
1
Some coefficients are doubled when I use the step() function
...plicated as "S1Q7.11" and "S1Q7.12" etc. I've googled and read and re-read the step() and stepAIC() documentation and I just can't figure out what it could mean. Removing the test="F" bit also generates the same behaviour. Any help greatly appreciated. Chris Beeley Institute of Mental Health, UK
2011 May 27
1
Subset command and the : operator
...ing error message: In X2 == 9:12 : longer object length is not a multiple of shorter object length I know I can use X1[ Time < 9 & Time > 3] but I would like to know what is wrong with the 5:8 usage in case I put it somewhere else and don't notice the problem. Many thanks! Chris Beeley Institute of Mental Health
2011 Jun 30
1
Match strings across two differently sized dataframes and copy corresponding row to dataframe
...(mydata$ImproveCat1[datavec[!is.na(datavec)]]) # yields 1567 length(comments$ImproveCat[commvec[!is.na(commvec)]]) # yields 1512 I'm sorry, I did try to construct an example dataframe, but ironically I can't make that work either! Sorry! Any help gratefully received. Many thanks! Chris Beeley Institute of Mental Health, UK
2011 Jun 20
2
Replace selected columns of a dataframe with NA
...ould be much more important, if say I just wanted to replace the odd columns, or something like that. I found this code on the internet too: idx <- which(foo>80, arr.ind=TRUE) foo[idx[1], idx[2]] <- NA But I can't seem to rewrite that either, for the same reason Many thanks! Chris Beeley Institute of Mental Health
2010 Aug 24
2
How to remove rows based on frequency of factor and then difference date scores
...starts at Date "1" and goes up in integers according to how many days have elapsed. I just know there's some incredibly cunning R-ish way of doing this but after many hours of fiddling I have had to admit defeat. I would be very grateful for any words of advice. Many thanks, Chris Beeley, Institute of Mental Health, UK
2012 Mar 28
1
Nested brew call yields Error in .brew.cat(26, 28) : unused argument(s) (26, 28)
...likely that I need to insert into the script the actual content of .brew.cat, but I can't seem to get R to tell me what it is and Googling throws up a lot of stuff about beer and not much else (drew a blank also from RSiteSearch("Nested brew")) Any help gratefully received. Chris Beeley Institute of Mental Health, UK
2011 Aug 12
1
odfWeave repeats output
...t sure which version I'm afraid). I've been unable to find anyone on any forums or anything with the same problem. Using R v2.13 on Windows, v 2.12 on Linux, was using RStudio but just tested it without (just in case) and it does the same thing. Any suggestions gratefully received. Chris Beeley Institute of Mental Health, UK. Output of the operation is below. With this output: > odfWeave("/media/Windows7/temp/GCAMT_in.odt", "/media/Windows7/temp/GCAMT_out2.odt") Copying /media/Windows7/temp/GCAMT_in.odt Setting wd to /tmp/RtmpAwd1Bm/odfWeave12095551677 Un...
2012 Jan 09
3
as.numeric() generates NAs inside an apply call, but fine outside of it
...bout the apply call that generates the NAs when as.numeric(mydata[,2]) doesn't and I'm not sure what to do about it in future. I realise I can just loop over the columns, but I would rather get to the bottom of this if I can so I know for future. Thanks in advance for any advice Chris Beeley Institute of Mental Health, UK dput() gives- structure(list(id = structure(1:79, label = structure("Participant", .Names = "id"), class = "labelled"), item2.jan11 = structure(c(4L, 3L, 6L, 4L, 6L, 6L, 2L, 6L, 2L, 2L, 3L, 3L, 1L, 6L, 2L, 6L, 4L, 2L, 6L, 2L,...
2012 May 31
1
anova of lme objects (model1, model2) gives different results depending on order of models
...8926 <.0001 In both cases I am led to accept model 2 even though they are opposite models. Is it really just that you have to put them in the right order? It just seems like if there were say four models you wouldn't necessarily be able to determine the correct order. Many thanks, Chris Beeley, Institute of Mental Health, UK ...session info follows > sessionInfo() R version 2.15.0 (2012-03-30) Platform: i386-pc-mingw32/i386 (32-bit) locale: [1] LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252 [3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C [5]...
2010 Jul 02
2
Problem with aggregating data across time points
...ly I still want these dates to appear- so e.g. 21-5-2008 would appear as 0 0 0 0, then 22-5-2008 might have 1 2 0 0, then 23-5-2008 0 0 0 0 again, and etc. I've had several abortive attempts and done some Googling but have got nowhere. I'd greatly appreciate any advice. Many thanks, Chris Beeley (Institute of Mental Health, UK) structure(list(Location = structure(c(1L, 2L, 2L, 1L, 3L, 5L, 5L, 1L, 1L, 2L, 2L, 2L, 3L, 3L, 4L, 4L, 1L, 5L, 5L, 5L, 5L, 6L, 1L, 2L, 3L, 5L, 6L, 6L, 6L, 7L, 7L, 5L, 5L, 4L, 4L, 4L, 3L, 3L, 3L, 2L, 2L, 2L, 2L, 7L, 7L, 7L, 6L, 5L, 4L, 4L, 6L, 5L, 2L, 2L, 3L, 3L, 3L...