m-orton / Evolutionary-Rates-Analysis-Pipeline

The purpose of this repository is to develop software pipelines in R that can perform large scale phylogenetics comparisons of various taxa found on the Barcode of Life Database (BOLD) API.
GNU General Public License v3.0
7 stars 1 forks source link

Sally got an error on line 1532 #19

Closed sadamowi closed 7 years ago

sadamowi commented 7 years ago

Hi Matt,

I got the below error when running the block of code starting on line 1532. I got a plot for Polychaeta but no others to scroll through.

foreach(i=1:length(relativeDistClass)) %do%

  • (print(ggplot(relativeDistClass[[i]], aes(x = variable, y = value, color = sign))
  • foreach(i=1:length(relativeDistClass)) %do%

Error: unexpected symbol in: " (print(ggplot(relativeDistClass[[i]], aes(x = variable, y = value, color = sign)) foreach"

(print(ggplot(relativeDistClass[[i]], aes(x = variable, y = value, color = sign))

    • geom_point(stat="identity", size = 2.5)
    • theme(text = element_text(size=13), axis.text.x = element_text(face="bold",angle=90, vjust=1))
    • ggtitle(paste0(classTitle[i],"\n", pValBinomialTitle[i], "\n", pvalWilcoxonTitle[i]))
    • labs(x="Pairing Number", y="Signed Relative OutGroup Distance", color = "sign")))

Cheers, Sally

sadamowi commented 7 years ago

Using very very secure dishes, I still get this error. This is now for line 1556. The error message is:

Error: unexpected symbol in: " (print(ggplot(relativeDistClass[[i]], aes(x = variable, y = value, color = sign)) foreach"

sadamowi commented 7 years ago

Also, I get a Polychaeta plot, but do not seem to be able to scroll to the Clitellata plot.

m-orton commented 7 years ago

Hi Sally,

I didnt seem to get this error when running Annelida (after updating) or currently after my first couple of runthroughs of Mollusca (hope to send results tomorrow).

I found this post on stackoverflow which may be useful: http://stackoverflow.com/questions/25889234/error-unexpected-symbol-input-string-constant-numeric-constant-special-in-my-co

In summary, apparently you can highlight code and hold ctrl+shift+a to reformat it when you are getting the "unexpected symbol" error. Next time you run the script (whichever phyla), try running the plot command like this instead to see if that changes anything for you:

foreach(i = 1:length(relativeDistClass)) %do% (print( ggplot(relativeDistClass[[i]], aes( x = variable, y = value, color = sign ))

If the command does work for you, then I can modify the script with the reformatted command.

Another thing to do would be to start a fresh RStudio session as well before doing another script runthrough to see if that helps also.

If that all fails, try resetting the RStudio desktop state. According to that stackoverflow post a corrupted desktop state can sometimes cause this error. Instructions on how to do this can be found here: (they give instructions for Mac as well) https://support.rstudio.com/hc/en-us/articles/200534577-Resetting-RStudio-s-State

Best Regards, Matt

m-orton commented 7 years ago

Ok so github doesnt seem to be formatting that command correctly. I think im going to change it in the script directly then.

Best Regards, Matt

sadamowi commented 7 years ago

Thanks very much Matt. I am going to leave these plotting issues aside for now, in favour of staying focused on the main analysis decisions. I hope to return to this in a couple of days.

m-orton commented 7 years ago

One thing I should mention about the plot is if you cant get it to work offline, I have confirmed that it works with the online RStudio on the cloud so we should still be able to get any plot figures we might want to include in the publication.

m-orton commented 7 years ago

This issue was moved to jmay29/lat-project#8