search for: post_df

Displaying 1 result from an estimated 1 matches for "post_df".

Did you mean: host_db
2017 Oct 13
1
Quotation marks hinder for loop
...y R console and I am also afraid of making any mistakes while typing the codes, I would like to make this code simple by using for loop. I know that the assign function is useful and another code as follows worked well with it: for(i in 1:N_var){ assign(paste("V", i, sep=""), post_df[Nrange$start[i]:Nrange$end[i],]) } However, I could not find how to apply for loop to 1) - 3) above. 1) >for (i in 1:N_var){ + assign(colnames(paste("V", i, sep=""))[2], par$V2[i]) + } Error in assign(colnames(paste("V", i, sep = ""))[2], par$V2[i]) :...