I have a list named mylist which consists of 9 character type elements.
>dput(mylist)
list("COG_ONTOLOGY", "GOTERM_BP_DIRECT", "GOTERM_CC_DIRECT",
"GOTERM_MF_DIRECT", "INTERPRO", "KEGG_PATHWAY", "PIR_SUPERFAMILY",
"SMART", "UP_KEYWORDS")
I also have 9 dataframes with the same names as the elements in mylist. For example, the dataframe COG_ONTOLOGY has the following structure.
COG_ONTOLOGY <- data.frame(
name = c("A", "B", "C", "D", "E"),
value = as.numeric(0))
In the dataframe COG_ONTOLOGY, I need to increment the value of A by 1, but without specifying the name of the dataframe and "A". I tried this but it doesn't seem to work.
assign(get(mylist[[1]])[1, "value"], get(mylist[[1]])[1, "value"] + 1)