problems with ddply

763 views
Skip to first unread message

Antonio Pedro Ramos

unread,
Jun 3, 2013, 9:50:05 PM6/3/13
to manip...@googlegroups.com
Hi all,

I am getting the following error message from a code that was working fine so far:

> income <- ddply(my.data,.(country,birth_year),summarize,income.country=unique(log_IHME_id_gdppc_c))
Error in is.list(by) : 'by' is missing

All my call from ddply is generating this complain about the "by" argument. Does it make sense? I can provide a reproducible example, if needed.

Thanks,

Antonio Pedro. 

Ista Zahn

unread,
Jun 4, 2013, 9:01:11 AM6/4/13
to Antonio Pedro Ramos, manip...@googlegroups.com
Hi Antonio,

Yes, I think a reproducible example would be helpful.

Best,
Ista


--
You received this message because you are subscribed to the Google Groups "manipulatr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to manipulatr+...@googlegroups.com.
To post to this group, send email to manip...@googlegroups.com.
Visit this group at http://groups.google.com/group/manipulatr?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Antonio P. Ramos

unread,
Jun 4, 2013, 11:34:10 AM6/4/13
to Ista Zahn, manip...@googlegroups.com
The package Hmisc was in the path ahead of plyr and therefore its object 'summarize' was masked. That's was the problem. Thanks, Antonio Pedro. 

Winston Chang

unread,
Jun 4, 2013, 4:56:16 PM6/4/13
to Antonio P. Ramos, Ista Zahn, manip...@googlegroups.com
This is an issue that people run into fairly often... It's a good idea
to use the British spelling 'summarise' instead -- it's the same plyr
function, and it won't conflict with the Hmisc 'summarize' function.

-Winston

Hadley Wickham

unread,
Jun 4, 2013, 4:57:32 PM6/4/13
to Winston Chang, Antonio P. Ramos, Ista Zahn, manip...@googlegroups.com
Plus British spelling is better ;)
Chief Scientist, RStudio
http://had.co.nz/

Brandon Hurr

unread,
Jun 5, 2013, 2:23:18 AM6/5/13
to Hadley Wickham, Winston Chang, Antonio P. Ramos, Ista Zahn, manip...@googlegroups.com
Spoken like a member of the commonwealth. 
Reply all
Reply to author
Forward
0 new messages