I finally found the problem within my site_data object...
this works well:
snip
site_data - sqlQuery(channel, select site_no from [biomass_data$]
group by site_no)$site_no
for(i in site_data) {
assign(paste(site,i,_data,sep=), sqlQuery(channel,
paste(select * from [biomass_data$] where
Hi there,
I've got a database or rather spreadsheet with several columns and rows.
For one column named sites I want to loop through all possible values
and retrieve
all data out of the database where site = x and write it into an
object named 'sitex_data'.
Somehow I'm really missing
Hello
-Original Message-
From: r-help-boun...@r-project.org
[mailto:r-help-boun...@r-project.org]
On Behalf Of Katharina May
Sent: Monday, April 20, 2009 5:05 PM
To: r-help@r-project.org
Subject: [R] create objects in a loop and adding sqlQuery content to
them
Hi there,
#Here my first try [error message on the line within the loop,
saying
something like:
# 'recursive indexing on level 2 failed']
sites_object_list - vector(list,99)
If there's a site number larger than 99 this will be problematic.
Sorry, this isn't correct - R will just increase
On Apr 20, 2009, at 8:04 PM, Katharina May wrote:
Hi there,
I've got a database or rather spreadsheet with several columns and
rows.
For one column named sites I want to loop through all possible
values and retrieve
all data out of the database where site = x and write it into an
object
5 matches
Mail list logo