Time Magazine wrote: » Firstly, obviously, you'll need to install the package correctly. This should be done easily enough. I don't know what StatConn does but if you have an Excel file, it's very easy to get that open in R. R isn't easy to master. It's a steep learning curve so unless you can't do a Compositional Data Analysis (I'm sorry, I don't know what this is either) in another package then I wouldn't recommend it unless you're very enthusiastic. What is Compositional Data Analysis - are you looking to do anything much more complicated than means and the like? If not, Excel is probably best? Anyway if you have an Excel file and you want to open it in R, here are the steps: Allow the first row of the Excel file to be the variable names, so it would look something like: tree_id | height | mass | age | root_mass | stem_mass 001 | 100 | 150 | 8 | 2 | 8 002 | 120 | 200 | 12 | 4 | 12 ... | | | | | 150 | 80 | 100 | 7 | 1 | 1 [*] Save it as a Text (tab-delimited) file and call it "myfile.txt" [*] Open up R [*] Click File > Working Directory and set it to the folder you've saved "myfile.txt" [*] Enter the command mydata = read.delim("myfile.txt",header=TRUE) --- this will import your excel file as a matrix (named "mydata") that you can play with [*] Take out the specific variables from the matrix. For example the command tree_age = mydata$age will create a column vector, named "tree_age", that's taken from the column in your matrix with the title "age", i.e. the 4th column from the Excel sheet above [*] Better yet, when you've figured out all the commands you want, paste them into notepad and save them in a file called "hello.R" [*] You can then tell R to run all these commands in one go with the command source("hello.R") [*] Add as many commands to "hello.R" as you wish and let R do the sums. For example you might have mean_age = mean(tree_age) which will create a variable with the mean age of all the trees. Hope this helps.
efla wrote: » Sorry to butt in - does this procedure work for stata also?
Yi Harr wrote: » Thanks for that, there's definitely a steep learning curve with R but I'm finding it slightly easier every day. Found some decent tutorial videos on youtube.