[R] processing data of hierarchical river network

2011-11-12 Thread tlange
Hi,

I have some hydrochemical data from observation stations of a river
network. The data set provides information about the river hierarchy, i.e.
the order of the rivers (main river is 1st order, contributing is 2nd
order, and contributing to 2nd is 3rd order... etc).

Now I would like to use the hierarchical information to:
a) plot a dendrogram of the observation stations
b) perform some simple statistics on the different branches

What packages are needed to conduct that investigation?
How the hierarchical information should be formated to be easily processed
with R?

Thank you,
Torsten

__
R-help@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.


[R] naming list entries dynamically

2008-10-23 Thread tlange
Hello,

I'm new to R and I'd like to dynamically assign names to the entries of a
list.
The situation is: I load several ascii-files from a folder. The data shall
be stored within the list structure, where the file names are assigned to
the list entries.

> flist
$file1.txt
 [1]  1.0  1.2  1.4  1.6  1.8  2.0...
$file2.txt
 [1]  1.0  1.2  1.4  1.6  1.8  2.0...

That's what I would like to see. But I got stucked coding it. Web search
doesn't helped me a lot. Here is some code I thought it somehow would work
like this:

<
flist <- list()
fname <- list.files(pattern="some_pattern.txt")
for(i in 1:length(fname)) {
   flist$"how_do_I_name_it_dynamically?" <- read.table(fname[i],
header=FALSE)
}
>

Second: I assume to use lists in R more or less like Matlab-structs. I
hope that's not compleatly wrong... ?

Appreciating any help and hints,
Torsten

__
R-help@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.