for(i in 1:lengthBD)
{
bdid1 = basicdata[i,]
bdid = as.character(bdid1)


dq = paste("'",bdid,"'",sep = "")

dataquery = paste("select *","From Main_Data AS m JOIN Basic_Data AS b ON
m.BD_ID = b.BD_ID JOIN Point_System_Name AS p ON  b.psn_id = p.psn_id JOIN
Trend_Location as tl ON b.tl_id = tl.tl_id", "where b.bd_id = ",dq)

df1 = dbGetQuery(db, dataquery) # Dataframe for each set of Data Points

df2 = df1[!sapply(df1,function(z)any(is.na(z)))]

print(df2)

leng = nrow(df2)

print(leng)

..}

when I print df2, first set is fine with 31 rows but for all other
iterations also it reads only 31 rows from the database table.



On Fri, Dec 3, 2010 at 7:07 PM, Michael Bedward
<michael.bedward@gmail.com>wrote:

> Hello,
>
> Please post a sample of your code so people here can understand what
> you are trying to do.
>
> Michael
>
> On 4 December 2010 11:00, rushabhbm <rushabhbm@gmail.com> wrote:
> >
> > Guys,
> > I am new to R so please excuse if I am not very clear.
> >
> > My problem is: I have a 'for' loop in which I am defining a Dataframe df
> > with a SQL query.
> > First iteration gives a df with 31 rows(that's correct), however next
> > iterations also gives me max rows as 31. It's kinda stuck at that value.
> >
> > I might have to delete df(how to do that?) after  every iteration or if
> > there is any other solution.
> >
> > Thanks for your help,
> > Rushabh
> > --
> > View this message in context:
> http://r.789695.n4.nabble.com/Maximum-Number-of-Rows-in-a-Dataframe-tp3071950p3071950.html
> > Sent from the R help mailing list archive at Nabble.com.
> >
> > ______________________________________________
> > 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.
> >
>



-- 
Thanks and Regards,
Rushabh B. Mehta
MS Mechanical Engineering
University of Florida
Cell: 617-676-7285
http://www.linkedin.com/in/rushabhbm

	[[alternative HTML version deleted]]

