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
"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 in the data.frame that is returned by the sqldf
command
C
Dan -
Try using "having Premie not null" instead of
"having !is.na(Premie)" .
- Phil Spector
Statistical Computing Facility
Department of Statistics
Did you try a where statement?
where Premie is not null
On Tue, Jan 17, 2012 at 3:03 PM, Dan Abner 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
> having !is.
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 aggrega
5 matches
Mail list logo