This is the top of my R script which was shared on qiime forums. The script is meant to make a metadata file for multiple fastq files. How do I edit it to run without needing editing every time but I cant seem to tell it to use the current working director
Here is the problem code:
#!/usr/bin/env Rscript
library(tidyverse)
data_path <- paste ("./", "Data", sep = "/")
And its error:
Error in `[<-.data.frame`(`*tmp*`, "direction", value = "forward") :
replacement has 1 row, data has 0
Calls: [<- -> [<-.data.frame
Execution halted
Thankyou @forestfanjoe and @TingleTanglBob for the help For anyone wondering how a setwd should be formatted see this working example =)
data_path <- paste (setwd ("Data/"),"Data", sep = "/")