Re: [R] Rename objects based on list

2008-11-15 Thread jim holtman
Here is one way using a 'list': > x <- data.frame(a=1:10, b=21:30, c=41:50) > out <- lapply(x, function(z){ + hist(z, plot=FALSE) + }) > > str(out) List of 3 $ a:List of 7 ..$ breaks : num [1:6] 0 2 4 6 8 10 ..$ counts : int [1:5] 2 2 2 2 2 ..$ intensities: num [1:5] 0.1 0.1 0.1

[R] Rename objects based on list

2008-11-15 Thread Wade Wall
Hi all, I am trying to find a way to rename R objects with names pulled from a vector of names. For example, I have a data frame, my.data.frame, and a list of names, my.names. My.names is simply the column names of my.data.frame. I want save the histogram with the column name as the name of the