[R] Odp: Very new - beginners questions

Petr PIKAL petr.pikal at precheza.cz
Mon Aug 13 15:10:40 CEST 2007


r-help-bounces at stat.math.ethz.ch napsal dne 13.08.2007 14:04:50:

> Dear all,
> I have 4 sites and want to determine how different they are from each 
> For this I have decided to use R though it seems a bit daunting to 
>   I have read data in from a CSV the structure is :
>    Species1 Species2 Species3
> Site1 4 4  7 
> Site2 3 1  0
> Site3 0 99  6
> Site4 75 3  33
> There are many more species than shown above this is just an example. 
Here are
> the questions.
>   How do I read one row of data so as to load site2 into a variable 
called site2?

?read.table and other read..... commands. Do not work with variables but 
with data frames. 

> Once I plot a graph using ordiplot how do I extract it from R so that I 
> put it into a Word for Windows document?

1. save a graph from menu
2. use ?png, ?jpeg and others to see how to output graph to files 

>   Once I have the data in varables I hope to use designdist and Sřrensen 
> discover diversity indices. I had a crack at this once but because I had 
> as the columns it didn't work. Now that I think I have the data correct 
I can proceed.
>   x Input data (this will be the whole data set that I read into my 
> 'allSites' from a CSV.)?
> The variables for Sřrensen will contain terms J for shared quantity, A 
and B 
> for totals, N for the number of rows (sites) and P for the number of 
> (species) and 'Binary' as the term.
>   How do I get the shared number of species for each row?
>   Probably very beginner type questions but I want to get on an haven't 
> found the answers in my trawl throgh the help. Is there a book that I 
can buy 
> to learn R?

look at CRAN. You can find various books from beginners to quite advanced. 
e.g. P.Dalgaard Introductory statistics with R isd quite good for first 
steps. Or you can consult Rtips from Paul Johnson. (Just type statsrus 
into Google). Good idea is also to look into posting guide.


>   All the best,
> Richard Price
> MSc student University Birmingham.
>    [[alternative HTML version deleted]]
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide 
> and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list