What I want to do is to set a value in R called "filename", with the content being the first part of a filename.
filename <- "E14_AD_4hr_"
I then want to use this 'filename' value to both name and call vectors that will be created through an R script.
Using the bash $ , the syntax would look something like this:
filename <- "E14_AD_4hr_"
$filename_Asz1 <- read.table("~/Documents/1608_10_MiSeq/untitled folder 2/E14-AD-4_S20_L001/Filtered_by_quality/E14-AD-4_S20_L001_Asz1/methylation.tsv", quote="\"", comment.char="") etc.
But this only gives me an error in R.
To get it to run the script correctly, I have to enter the first part of the filenames manually, which is a pain and very inelegant (there's more to the script, but I've only posted the first line).
E14_AD_4hr_Asz1 <- read.table("~/Documents/1608_10_MiSeq/untitled folder 2/E14-AD-4_S20_L001/Filtered_by_quality/E14-AD-4_S20_L001_Asz1/methylation.tsv", quote="\"", comment.char="")
Basically what I'm asking is does anyone know the correct syntax to set and call a name in this way, in R?
Thanks.