[R] win.metafile() and family

2009-06-18 Thread Simon Pickett
Trawled through messages on here and read Rdegva but couldnt find the answer. Are there any user friendly windows user guides about all this? R 2.8.1 Windows XP 2003 Cheers, Si. Dr. Simon Pickett Research Ecologist Land Use Department Terrestrial Unit British Trust for Ornithology The Nunnery

Re: [R] filtering number of values in a data frame

2009-06-18 Thread Simon Pickett
I think you can then use merge() to merge them back together n- merge(n, df, by.x = c(m.values), by.y = c(Start), all.x = F, all.y = F) also see ?aggregate for a more efficient solution. HTH, Si. - Original Message - From: Schönemann, Rene rschoenem...@railways.tu-berlin.de To:

[R] data manipulation involving aggregate

2009-05-29 Thread Simon Pickett
,pond,field,river) )) Is there an eloquent, efficient way of doing this? My solution involves lots of intermediate aggregated data frames, one for each habitat, then a series of merges onto a bigger data frame. Thanks peeps and have a good weekend, Simon. Dr. Simon Pickett Research

Re: [R] Help me...!!!

2009-05-26 Thread Simon Pickett
have a read at these pdfs http://cran.r-project.org/other-docs.html you are likely to get a bashing for asking people to do your homework for you! Simon. - Original Message - From: abel1682 lizard_1...@yahoo.it To: r-help@r-project.org Sent: Tuesday, May 26, 2009 3:37 PM Subject:

Re: [R] Concatenating two vectors into one

2009-05-18 Thread Simon Pickett
z-c(x,y) cheers, Simon. - Original Message - From: Henning Wildhagen hwildha...@gmx.de To: r-help@r-project.org Sent: Monday, May 18, 2009 12:09 PM Subject: [R] Concatenating two vectors into one Dear users, a very simple question: Given two vectors x and y

Re: [R] Simple plotting errors

2009-05-18 Thread Simon Pickett
you mean you want to plot SUM against month? (assuming these12 data frames are 12 months). you could first bind them all together using data.frame(), see ?data.frame which would make it much easier. you need to create a variable for months then plot it against your variable. If you dont

Re: [R] Simple plotting errors

2009-05-18 Thread Simon Pickett
you mean you want to plot SUM against month? (assuming these12 data frames are 12 months). you could first bind them all together using data.frame(), see ?data.frame which would make it much easier. you need to create a variable for months then plot it against your variable. If you dont

Re: [R] Concatenating two vectors into one

2009-05-18 Thread Simon Pickett
Sorry, I saw the word concatenate and dived in. Andrew Dolmans solution works fine. Simon. - Original Message - From: Linlin Yan yanlinli...@gmail.com To: Simon Pickett simon.pick...@bto.org Cc: Henning Wildhagen hwildha...@gmx.de; r-help@r-project.org Sent: Monday, May 18, 2009 12

Re: [R] Simple plotting errors

2009-05-18 Thread Simon Pickett
you mean you want to plot SUM against month? (assuming these12 data frames are 12 months). you could first bind them all together using data.frame(), see ?data.frame which would make it much easier. you need to create a variable for months then plot it against your variable. If you dont

Re: [R] Simple plotting errors

2009-05-18 Thread Simon Pickett
read ?par 1.use ylab= to suppress y labels, then mxtext to manually draw em yourself OR use mgp=... within par() 2.use xlab not xlim to change the x axis labels HTH, Si. - Original Message - From: Steve Murray smurray...@hotmail.com To: simon.pick...@bto.org; r-help@r-project.org;

Re: [R] Superscripts and subscripts in trellis graphics

2009-05-18 Thread Simon Pickett
Hi Steve, you need to use the expression() function. I think it is described under ?plotmath. Defo works with mtext, not sure about ylab. try ylab(text=c(expression(paste(Hatched Eggs R^{2} etc. - Original Message - From: steve_fried...@nps.gov To: r-help@r-project.org Sent:

Re: [R] need help

2009-05-15 Thread Simon Pickett
Read about glm by typing ?glm There are tons of books and pdfs out there to show you the basics. http://cran.r-project.org/other-docs.html HTH, Si. - Original Message - From: H Z zamani_...@yahoo.com To: r-help@r-project.org Sent: Friday, May 15, 2009 12:26 PM Subject: [R] need

Re: [R] displaying results

2009-05-15 Thread Simon Pickett
Absolutely no idea what you mean, Try reconstructing your question in concise English with reproducible code. Simon. - Original Message - From: deanj2k dl...@le.ac.uk To: r-help@r-project.org Sent: Friday, May 15, 2009 1:33 PM Subject: [R] displaying results Hi everyone, can

Re: [R] name siz ein cluster

2009-05-13 Thread Simon Pickett
I'm afraid I have no experience with the clue package, but if all else fails you could consider the hclust package. You change font size in the conventional way with this. Cheers, Simon. - Original Message - From: Penner, Johannes johannes.pen...@mfn-berlin.de To:

Re: [R] read multiple large files into one dataframe

2009-05-13 Thread Simon Pickett
can you provide reproducible code please? even a fake example would help. I would 1) set up a loop to read in each file from a directory 2) inside the loop chop up/ aggregate the data, each file in turn and spit each new aggreagated file out to a directory using write.table(). This will

Re: [R] I'm offering $300 for someone who know R-programming to dothe assignments for me.

2009-05-08 Thread Simon Pickett
at least he/she is resourceful! (but also very naughty) - Original Message - From: steve_fried...@nps.gov To: ayaku1...@gmail.com Cc: r-help@r-project.org; r-help-boun...@r-project.org Sent: Friday, May 08, 2009 12:48 PM Subject: Re: [R] I'm offering $300 for someone who know

Re: [R] I'm offering $300 for someone who know R-programming to do the assignments for me.

2009-05-08 Thread Simon Pickett
I bet at least a few people offered their services! It might be an undercover sting operation to weed out the unethical amongst us :-) - Original Message - From: Wacek Kusnierczyk waclaw.marcin.kusnierc...@idi.ntnu.no To: Tung86 wyut...@gmail.com Cc: R help r-h...@stat.math.ethz.ch

Re: [R] Do you use R for data manipulation?

2009-05-06 Thread Simon Pickett
My institute uses SAS religiously, I am the only R heathen. I have resisted learning to use SAS because I dont see the point after years of using R and I like being able to do everything using one program. However, my colleagues maintain that SAS is better for programming without really ever

Re: [R] Do you use R for data manipulation?

2009-05-06 Thread Simon Pickett
Thanks Laura, I deal with huge data sets and have to do alot of fancy juggling of data to get the job done in R. I have recently been granted access to a cluster at a university which means 64 bit machines with 8gb of memory, which could prove to be a saviour hopefully. Simon. -

Re: [R] joined R-today

2009-04-21 Thread Simon Pickett
Hi, Check out the FAQ on the home page about installing packages. You need to 1. Install the package from a local mirror, you can do this from the drop down menu (Install packages) 2. then call the package using library(name of the package) It helps to know where your R library directory is

Re: [R] R graph into MS Word: which format to use?

2009-04-20 Thread Simon Pickett
I actually get superior results from creating a pdf, opening it in adobe acrobat, adjust the image size so it is big as possible with the screen, then copying it into word (by using the little square capture icon). HTH, Simon. - Original Message - From: jjh21 jjhar...@gmail.com To:

[R] reading an image and adding a legend

2009-04-09 Thread Simon Pickett
in pm.readmagicnumber(con) : Not a PNM format file I have tried changing the dpi when I export the image but still no cigar. I have dredged the help forum for related files and read the help files. My Os is windows XP and i'm running 2.8.1. I feel I'm missing something obvious! Thanks Dr. Simon

Re: [R] Manual sort in a for loop

2009-03-26 Thread Simon Pickett
I would suggest avoiding the function ?assign inside a loop. I used top use this until someone here kindly pointed out that it was much easier to catch the data of interest in a list... eg. df.list - vector(list, length(10)) for (i in 1:10)}

Re: [R] Merging

2009-03-17 Thread Simon Pickett
Hi, I'm pretty sure you dont mean merge since merge() creates a new big data frame from two small ones. It appears that you want to omit some rows. As I said before, get used to selecting rows like this data.frame-data.frame[data.frame$conditional.rows1000,] (for example) Although I dont

Re: [R] who can give me some hint?

2009-03-12 Thread Simon Pickett
Hi All, act_2 DateDtime Hour Min Second Rep 51 2006-02-22 14:52:18 14 52 18 useractivity_act 52 2006-02-22 14:52:18 14 52 18 4 55 2006-02-22 14:52:49 14 52 49 4 57 2006-02-22 14:52:51 14 52 51

Re: [R] Mixed models fixed effects

2009-03-11 Thread Simon Pickett
Also check out these pdfs http://cran.r-project.org/other-docs.html and try to get your hands on the bible http://www.amazon.co.uk/R-Book-Michael-J-Crawley/dp/0470510242 Simon. Hi Emma, Continuous predictors are no problem at all. You can mix both continuous and categorial predictors if

[R] help structuring mixed model using lmer()

2009-03-10 Thread Simon Pickett
) anova(model1,model2) , but how do I test the interaction? Thanks in advance, Simon. Dr. Simon Pickett Research Ecologist Land Use Department Terrestrial Unit British Trust for Ornithology The Nunnery Thetford Norfolk IP242PU 01842750050 [[alternative HTML version deleted

Re: [R] help structuring mixed model using lmer()

2009-03-10 Thread Simon Pickett
possible do to that using a glm approach. I think I have to run separate models for each site, calculate the gradient, then do a lm with gradient explained by habitat score Thanks, Simon. On Tue, Mar 10, 2009 at 10:15 AM, Simon Pickett simon.pick...@bto.org wrote: This is partly

Re: [R] Inference for R Spam

2009-02-24 Thread Simon Pickett
I got the same spam message today and I havent signed up for anything except this forum mailing list. The software they are trying to sell doesnt seem to cover any new ground anyway. Simon. - Original Message - From: Thomas Lumley tlum...@u.washington.edu To: ronggui

Re: [R] write.table

2009-02-20 Thread Simon Pickett
Hi Laura, You need to specify where you want to write your table. Like this... write.table(result, file=C:/Documents and Settings/simonp/Desktop/result.csv, sep = ,,row.names = F) If you have to do this alot I think you can set your working drive up to always write table in the same

Re: [R] plotting questions

2009-02-20 Thread Simon Pickett
Hi Oliver, 1) thats easy, if you want to display several graphs at once type windows(), once for each new graph. 2) Not sure exactly what you mean here but you have complete control over graphs in R. e.g. plot a blank graph then add axex using axis(), add points using points(), etc. etc.

[R] type III effect from glm()

2009-02-19 Thread Simon Pickett
it is not in an interaction? Thanks in advance, Simon. Dr. Simon Pickett Research Ecologist Land Use Department Terrestrial Unit British Trust for Ornithology The Nunnery Thetford Norfolk IP242PU 01842750050 [[alternative HTML version deleted

Re: [R] type III effect from glm()

2009-02-19 Thread Simon Pickett
Sorry, that was a typo in the email, not the model. So I still have the problem. Cheers, Simon. - Original Message - From: Ted Harding ted.hard...@manchester.ac.uk To: Simon Pickett simon.pick...@bto.org; r-help@r-project.org Sent: Thursday, February 19, 2009 10:56 AM Subject

Re: [R] type III effect from glm()

2009-02-19 Thread Simon Pickett
. - Original Message - From: markle...@verizon.net To: Simon Pickett simon.pick...@bto.org Sent: Thursday, February 19, 2009 10:50 AM Subject: RE: [R] type III effect from glm() Hi Simon: John Fox can say a lot more about below but I've been reading his book over and over recently and one thing

Re: [R] Unadulterated plot

2009-02-16 Thread Simon Pickett
Hi James, What you really need to do is to check out the many freely available pdfs for R beginners. Here is a good place to start http://cran.r-project.org/other-docs.html If I am right interpreting what you want, I think you need to create a blank plot with no axes, axis labels etc. Try

Re: [R] How to split a character vector into 3 vectors

2009-02-11 Thread Simon Pickett
someone has probably answered this already but use substr() new variable-substr(old.variable,1,1) Simon. - Original Message - From: kayj kjaj...@yahoo.com To: r-help@r-project.org Sent: Tuesday, February 10, 2009 6:50 PM Subject: [R] How to split a character vector into 3 vectors

[R] data editor in R- could it be improved?

2009-02-04 Thread Simon Pickett
the names might often be very big if the data frame was created using a function). Side-ways scrolling is quite jerky too. Just wondered if this was on anyone else's wish list? Simon. Dr. Simon Pickett Research Ecologist Land Use Department Terrestrial Unit British Trust for Ornithology The Nunnery

[R] help using zeroinfl()

2009-01-22 Thread Simon Pickett
) x-c(3,4,5,2,3,6,3,7,4,8,5,8,3) m1-zeroinfl(y~x|x) Zero-Inflated Count Model Using logit to model zero vs non-zero Using Poisson for counts Error in terms.formula(formula, data = data) : argument is not a valid model Can anyone shed any light please? Simon. Dr. Simon Pickett Research

[R] creating a list of matrices or data frames

2009-01-20 Thread Simon Pickett
Hi all, How would you create a list of data.frames within a loop, then bind all the elements of the list using rbind? take this example of matrices with differing numbers of rows for(i in 1:3){ assign(paste(s,i, sep=),matrix(data = NA, nrow = i, ncol = 3, byrow = FALSE, dimnames = NULL)) }

[R] faster version of split()?

2009-01-16 Thread Simon Pickett
Hi all, I want to calculate the number of unique observations of y in each level of x from my data frame df. this does the job but it is very slow for this big data frame (159503 rows, 11 columns). group.list - split(df$y,df$x) count - function(x) length(unique(na.omit(x)))

Re: [R] Two Noobie questions

2009-01-07 Thread Simon Pickett
Allen, I would suggest reading about the str() function. It's great for getting inside model outputs and seeing how they are constructed so you can extract all the specific calculations you want. Its a bit fiddly to get used to but there are plenty of examples on this forum. Hope this

Re: [R] R in the NY Times

2009-01-07 Thread Simon Pickett
I would like to add that I would have spent many more years doing my PhD if it wasnt for R! all data management, statistics and graphics were conducted using it. This was the direction my university and many more research institutes appear to be heading. It probably doesnt get said enough and

Re: [R] Changing Matrix Header

2009-01-06 Thread Simon Pickett
Hi Gundala, try chopping off the top row like newx-as.matrix(x[2:dim(x)[1],]) OR try changing it to a data frame... new x-data.frame(x,row.names=NULL) #pretty sure its not row.names but there is probably an equivalent for col.names OR look into ?read.table and specify header = F Cheers,

Re: [R] Large Dataset

2009-01-06 Thread Simon Pickett
type ?memory into R and that will explain what to do... S - Original Message - From: Edwin Sendjaja edw...@web.de To: r-help@r-project.org Sent: Tuesday, January 06, 2009 11:41 AM Subject: [R] Large Dataset Hi alI, I have a 3.1 GB Dataset ( with 11 coloumns and lots data in int

Re: [R] Large Dataset

2009-01-06 Thread Simon Pickett
Only a couple of weeks ago I had to deal with this. adjust the memory limit as follows, although you might not want 4000, that is quite high memory.limit(size = 4000) Simon. - Original Message - From: Edwin Sendjaja edw...@web.de To: Simon Pickett simon.pick...@bto.org Cc: r

Re: [R] Large Dataset

2009-01-06 Thread Simon Pickett
Yup, it was a typo. But I always try capital if lower case doesnt work, Sorry. - Original Message - From: David Winsemius dwinsem...@comcast.net To: Simon Pickett simon.pick...@bto.org Cc: Edwin Sendjaja edw...@web.de; r-help@r-project.org Sent: Tuesday, January 06, 2009 12:40 PM

Re: [R] Large Dataset

2009-01-06 Thread Simon Pickett
of luck. Simon. - Original Message - From: Edwin Sendjaja edw...@web.de To: Simon Pickett simon.pick...@bto.org Cc: r-help@r-project.org Sent: Tuesday, January 06, 2009 2:53 PM Subject: Re: [R] Large Dataset Hi Simon, My RAM is only 3.2 GB (actually it should be 4 GB, but my

Re: [R] Large Dataset

2009-01-06 Thread Simon Pickett
edw...@web.de To: Simon Pickett simon.pick...@bto.org Cc: r-help@r-project.org Sent: Tuesday, January 06, 2009 5:04 PM Subject: Re: [R] Large Dataset Hi Simons, Is SAS more powerfull than R? Well, I think I cannot afford to buy SAS. actually, my computer isn't really slow. I think 4GB RAM

Re: [R] I need course in R

2008-12-19 Thread Simon Pickett
learning curve, but once you get to grips with the basics, I've found that I can find out everything else I need to know by searching these archives... Hope this helps, Simon Pickett. - Original Message - From: Uwe Ligges lig...@statistik.tu-dortmund.de To: xavier ordoñez rlistxa

Re: [R] Akaike weight in R

2008-12-19 Thread Simon Pickett
I'm pretty sure you have to work it out yourself. Here is an example of how you would tabulate the AIC weights from three models (check that my calculations are correct before using this yourself!). Basically model.name$aic will cut out the AIC values then write a formula to calculate the

Re: [R] re ad.table

2008-12-19 Thread Simon Pickett
probably best just to change each variable one by one to the correct classification after you have read the data frame in. variable-as.character(variable) - Original Message - From: threshold r.kozar...@gmail.com To: r-help@r-project.org Sent: Friday, December 19, 2008 12:35 PM

Re: [R] I need course in R

2008-12-19 Thread Simon Pickett
yes I did, sorry. obviously good for stats rather than general code but still good bed time reading :-) Simon. - Original Message - From: June Kim junea...@gmail.com To: Simon Pickett simon.pick...@bto.org Sent: Friday, December 19, 2008 3:28 PM Subject: Re: [R] I need course in R

Re: [R] inserting zero instances with zeroes in a matrix

2008-12-18 Thread Simon Pickett
Wow, thats amazing, thanks very much!!! Simon. - Original Message - From: Henrique Dallazuanna To: Simon Pickett Cc: r-help@r-project.org Sent: Thursday, December 18, 2008 11:25 AM Subject: Re: [R] inserting zero instances with zeroes in a matrix Try

Re: [R] inserting zero instances with zeroes in a matrix

2008-12-18 Thread Simon Pickett
...@gmail.com Cc: Simon Pickett simon.pick...@bto.org; r-help@r-project.org Sent: Thursday, December 18, 2008 11:51 AM Subject: Re: [R] inserting zero instances with zeroes in a matrix Try this: as.data.frame(xtabs(count ~., d.f)) On Thu, Dec 18, 2008 at 6:25 AM, Henrique Dallazuanna www...@gmail.com

Re: [R] inserting zero instances with zeroes in a matrix

2008-12-18 Thread Simon Pickett
Actually, Both these solutions create contingency tables, with frequency rather than the original count values. Is there a way to retain the original count values? Thanks again, Simon. - Original Message - From: Simon Pickett simon.pick...@bto.org To: Gabor Grothendieck ggrothendi

[R] help: programming loop, binding columns between data sets

2008-12-11 Thread Simon Pickett
using R 2.1.1 on Windows Vista. Can anyone suggest a faster/more reliable alternative alternative please? Needless to say I am a programming novice. Thanks in advance, Simon Pickett. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman