I have a set of data with 2 columns: time, size. There are 20 sets of data. The data is looking at whether the size of a seed affects the time it takes to germinate. How do I then create a numerical variable called 'order' with values 1 to 20 in order to plot a graph or order against time? -- View this message in context: http://r.789695.n4.nabble.com/Order-function-tp4651022.html Sent from the R help mailing list archive at Nabble.com.
Order function
6 messages · John Kane, maths123, PIKAL Petr
Are you asking how to create a variable in each data set so that data set 1 has the idenfier 1 and so on? It's not clear from what you say if you have 20 different data sets (say data frame or file for each ) or if you have one file with the data. As a brute force approach in either case I'd just create a vector of appropriate length and cbind it to the data frame or whatever. John Kane Kingston ON Canada
-----Original Message----- From: linda_007 at hotmail.co.uk Sent: Tue, 27 Nov 2012 12:47:15 -0800 (PST) To: r-help at r-project.org Subject: [R] Order function I have a set of data with 2 columns: time, size. There are 20 sets of data. The data is looking at whether the size of a seed affects the time it takes to germinate. How do I then create a numerical variable called 'order' with values 1 to 20 in order to plot a graph or order against time? -- View this message in context: http://r.789695.n4.nabble.com/Order-function-tp4651022.html Sent from the R help mailing list archive at Nabble.com.
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
____________________________________________________________ FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!
I have one text file with all the data on there. So 20 rows of data. And 3 columns: numbers 1-20, size, time. I need to create a variable called 'order' as I need to use it for something in the next part. I am very confused as to how to do this. -- View this message in context: http://r.789695.n4.nabble.com/Order-function-tp4651022p4651166.html Sent from the R help mailing list archive at Nabble.com.
And yes I want the variable 1 to have the identifier 1 etc. And I need to call this variable "order" so I can use it to create an anova table. -- View this message in context: http://r.789695.n4.nabble.com/Order-function-tp4651022p4651198.html Sent from the R help mailing list archive at Nabble.com.
This is not a homework help list and it is even less a homework help list when there is no clear statement of the problem. I'd suggest reading something about how R works -there are some very good tutorials and introductions listed on the R site, and then perhaps coming back here if you have a specific question. http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example John Kane Kingston ON Canada
-----Original Message----- From: linda_007 at hotmail.co.uk Sent: Wed, 28 Nov 2012 08:49:42 -0800 (PST) To: r-help at r-project.org Subject: Re: [R] Order function I have one text file with all the data on there. So 20 rows of data. And 3 columns: numbers 1-20, size, time. I need to create a variable called 'order' as I need to use it for something in the next part. I am very confused as to how to do this. -- View this message in context: http://r.789695.n4.nabble.com/Order-function-tp4651022p4651166.html Sent from the R help mailing list archive at Nabble.com.
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
____________________________________________________________ FREE ONLINE PHOTOSHARING - Share your photos online with your friends and family! Visit http://www.inbox.com/photosharing to find out more!
Hi
-----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- project.org] On Behalf Of maths123 Sent: Wednesday, November 28, 2012 9:11 PM To: r-help at r-project.org Subject: Re: [R] Order function And yes I want the variable 1 to have the identifier 1 etc.
order <- 1:20 But order is also a function so you shall name it differently. Regards Petr
And I need to call this variable "order" so I can use it to create an anova table. -- View this message in context: http://r.789695.n4.nabble.com/Order- function-tp4651022p4651198.html Sent from the R help mailing list archive at Nabble.com.
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting- guide.html and provide commented, minimal, self-contained, reproducible code.