I'm very sorry about this post, I'm sure its way too simple but I've been looking and looking and can't find any answers! (yes my wifi is switched on =P haha) I'm building a pipeline for DNA analysis using BASH and it would be really useful to use this script in it. (I take 0% of the credit for its making but it has been posted for all to use) https://forum.qiime2.org/t/automatic-manifest-maker-in-r/2921 I have never done any work in R before so again I'm sorry if this is a dumb question.
I suspect the issue is with the first few lines or perhaps the way its being interpreted, here are the first 3 lines
library(tidyverse)
SamplesF <- list.files(path = "Data", pattern = "*.R1.fastq.gz", all.files =
FALSE,
full.names = TRUE, recursive = FALSE,
ignore.case = FALSE, include.dirs = FALSE, no.. = FALSE)
here are the errors
/home/qiime2/Taxonomy.R: line 1: syntax error near unexpected token `tidyverse'
/home/qiime2/Taxonomy.R: line 1: `library(tidyverse)'
Just to add some context, this is in a Ubuntu VM, the following commands were run to install and set up the packages
conda create -n R-Env -y
source activate R-Env
Install r-essentials and tidyverse package by running:
conda install r-essentials -y
conda install -c r r-tidyverse -y
conda install -c r r-gdata -y
I called the script Taxonomy.R and gave it chmod +x it was created and is currently in the ~ directory