Conte-Ecology / conteStreamTemperature_web

Description and scripts for running the temperature model through the SHEDS web application
MIT License
0 stars 0 forks source link

dplyr error in predictions_summary.Rmd #16

Open djhocking opened 9 years ago

djhocking commented 9 years ago

I am trying to rerun the predictions_summary.Rmd file to produce a pdf. I am getting the following error

> lst.year <- coef.list$B.year %>%
+   select(year, coef, mean) %>% 
+   split(f=.$year) %>% 
+   lapply(FUN=function(x) { 
+     y <- x$mean
+     names(y) <- x$coef
+     y
+   })
Error in split.default(x = seq_len(nrow(x)), f = f, drop = drop, ...) : 
  object '.' not found

I haven't used split before and have avoided dots with dplyr so this will take me a while to trouble shoot if you have a quick fix.

walkerjeffd commented 9 years ago

I've had mixed success using the .$ notation. Sometimes it works but sometimes not. I would just split the chain into multiple statements.

On a plane to San Diego for the weekend. Had enough of this snow and cold. Be back Tuesday.

On Friday, February 20, 2015, Daniel J. Hocking notifications@github.com wrote:

Assigned #16 https://github.com/Conte-Ecology/conteStreamTemperature_web/issues/16 to @walkerjeffd https://github.com/walkerjeffd.

— Reply to this email directly or view it on GitHub https://github.com/Conte-Ecology/conteStreamTemperature_web/issues/16#event-239432224 .

Jeffrey D. Walker, PhD http://walkerjeff.com

bletcher commented 9 years ago

Enjoy the warmth! More snow here tonight...

On Fri, Feb 20, 2015 at 5:21 PM, Jeff Walker notifications@github.com wrote:

I've had mixed success using the .$ notation. Sometimes it works but sometimes not. I would just split the chain into multiple statements.

On a plane to San Diego for the weekend. Had enough of this snow and cold. Be back Tuesday.

On Friday, February 20, 2015, Daniel J. Hocking notifications@github.com wrote:

Assigned #16 https://github.com/Conte-Ecology/conteStreamTemperature_web/issues/16 to @walkerjeffd https://github.com/walkerjeffd.

— Reply to this email directly or view it on GitHub < https://github.com/Conte-Ecology/conteStreamTemperature_web/issues/16#event-239432224

.

Jeffrey D. Walker, PhD http://walkerjeff.com

— Reply to this email directly or view it on GitHub https://github.com/Conte-Ecology/conteStreamTemperature_web/issues/16#issuecomment-75330367 .

Silvio O. Conte Anadromous Fish Research Center, U.S. Geological Survey P.O. Box 796 -- One Migratory Way Turners Falls, MA 01376 (413) 863-3803 Cell: (413) 522-9417 FAX (413) 863-9810

ben_letcher@usgs.gov bletcher@eco.umass.edu http://www.lsc.usgs.gov/?q=cafb-research

djhocking commented 9 years ago

So jealous! Have fun.

Sent from my iPhone

On Feb 21, 2015, at 10:21 AM, Ben Letcher notifications@github.com<mailto:notifications@github.com> wrote:

Enjoy the warmth! More snow here tonight...

On Fri, Feb 20, 2015 at 5:21 PM, Jeff Walker notifications@github.com<mailto:notifications@github.com> wrote:

I've had mixed success using the .$ notation. Sometimes it works but sometimes not. I would just split the chain into multiple statements.

On a plane to San Diego for the weekend. Had enough of this snow and cold. Be back Tuesday.

On Friday, February 20, 2015, Daniel J. Hocking notifications@github.com<mailto:notifications@github.com> wrote:

Assigned #16 https://github.com/Conte-Ecology/conteStreamTemperature_web/issues/16 to @walkerjeffd https://github.com/walkerjeffd.

Reply to this email directly or view it on GitHub < https://github.com/Conte-Ecology/conteStreamTemperature_web/issues/16#event-239432224

.

Jeffrey D. Walker, PhD http://walkerjeff.com

Reply to this email directly or view it on GitHub https://github.com/Conte-Ecology/conteStreamTemperature_web/issues/16#issuecomment-75330367 .

Silvio O. Conte Anadromous Fish Research Center, U.S. Geological Survey P.O. Box 796 -- One Migratory Way Turners Falls, MA 01376 (413) 863-3803 Cell: (413) 522-9417 FAX (413) 863-9810

ben_letcher@usgs.govmailto:ben_letcher@usgs.gov bletcher@eco.umass.edumailto:bletcher@eco.umass.edu http://www.lsc.usgs.gov/?q=cafb-research

Reply to this email directly or view it on GitHubhttps://github.com/Conte-Ecology/conteStreamTemperature_web/issues/16#issuecomment-75376170.