error with gather

852 views
Skip to first unread message

alain content

unread,
Oct 15, 2014, 7:25:19 AM10/15/14
to manip...@googlegroups.com
Hi, 

Am I the only one to see that error with gather ?
I tried different ways, re-installed dplyr and tidyr, but no success :

> library(dplyr)

Attaching package: 'dplyr'
The following object is masked from 'package:stats':
    filter

The following objects are masked from 'package:base':
    intersect, setdiff, setequal, union

> library(tidyr)
> DFm <- mtcars %>% select(mpg, disp:vs)%>%gather( "var", "val", -vs)
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  there is no package called 'plyr'
 
> version
               _                           
platform       x86_64-apple-darwin13.1.0   
arch           x86_64                      
os             darwin13.1.0                
system         x86_64, darwin13.1.0        
status                                     
major          3                           
minor          1.1                         
year           2014                        
month          07                          
day            10                          
svn rev        66115                       
language       R                           
version.string R version 3.1.1 (2014-07-10)
nickname       Sock it to Me  

Any suggestion ?
Thanks in advance
Alain  

Hadley Wickham

unread,
Oct 15, 2014, 11:10:47 AM10/15/14
to alain content, manipulatr
Maybe you need to reinstall tidyr?

Hadley
> --
> 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.
> For more options, visit https://groups.google.com/d/optout.



--
http://had.co.nz/

Alain Content

unread,
Oct 15, 2014, 7:00:29 PM10/15/14
to Hadley Wickham, Alain Content, manipulatr
Hi Hadley,

Nope, did that — same error message with re-installed tidyr (as well as with dev version from github)

Some hint below :

> library(tidyr)
> DFm <- mtcars %>% select(mpg, disp:vs)%>%gather( "var", "val", -vs)
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called ‘plyr’
> install.packages("plyr")
trying URL 'http://cran.rstudio.com/bin/macosx/mavericks/contrib/3.1/plyr_1.8.1.tgz'
Content type 'application/x-gzip' length 863410 bytes (843 Kb)
opened URL
==================================================
downloaded 843 Kb


The downloaded binary packages are in
/var/folders/zq/tk4r4mns51z5bx3q30bg9wbc0000gn/T//RtmpNr1pGU/downloaded_packages

> # plyr is installed but not loaded:
> ddply()
Error: could not find function "ddply"

> DFm <- mtcars %>% select(mpg, disp:vs)%>%gather( "var", "val", -vs)
>
> remove.packages("plyr")
Removing package from ‘/Library/Frameworks/R.framework/Versions/3.1/Resources/library’
(as ‘lib’ is unspecified)

Restarting R session...

> library(tidyr)
> DFm <- mtcars %>% select(mpg, disp:vs)%>%gather( "var", "val", -vs)
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called ‘plyr’

Hadley Wickham

unread,
Oct 16, 2014, 9:14:29 AM10/16/14
to Alain Content, Alain Content, manipulatr
It's definitely something peculiar to your setup.
Hadley
--
http://had.co.nz/
Reply all
Reply to author
Forward
0 new messages