having is right; use HAVING Premie IS NOT NULL instead. The sqldf
package has a SQLite database running behind it. All NA get internally
converted to NULL, which is the standard representation for N/A in SQL, and
then they become NA in the data.frame that is returned by the sqldf
command
Phil, sorry; I didn't see your response. You are right; the IS is
superfluous
On Wednesday, August 28, 2013 8:56:19 AM UTC-7, Alex Gilgur wrote:
having is right; use HAVING Premie IS NOT NULL instead. The sqldf
package has a SQLite database running behind it. All NA get internally
Hi everyone,
I have the following:
sqldf(select Premie,count(tpounds) N,avg(tpounds) Avg_Weight,
stddev_samp(tpounds) StdDev
from children
group by Premie
having !is.na(Premie))
sqldf() does not like the !is.na(Premie) specification. How does one
exclude a missing group in an aggregated
Did you try a where statement?
where Premie is not null
On Tue, Jan 17, 2012 at 3:03 PM, Dan Abner dan.abne...@gmail.com wrote:
Hi everyone,
I have the following:
sqldf(select Premie,count(tpounds) N,avg(tpounds) Avg_Weight,
stddev_samp(tpounds) StdDev
from children
group by Premie
Dan -
Try using having Premie not null instead of
having !is.na(Premie) .
- Phil Spector
Statistical Computing Facility
Department of Statistics
5 matches
Mail list logo