I have a list of variables, like a1, a2, a3. Then I want to do a loop for these variable, for instance, assign values. I tried paste, which just gave character like "a1", that was not what I am really look for. Can anyone provide a solution?
相关问题
- R - Quantstart: Testing Strategy on Multiple Equit
- Using predict with svyglm
- Reshape matrix by rows
- Extract P-Values from Dunnett Test into a Table by
- split data frame into two by column value [duplica
相关文章
- How to convert summary output to a data frame?
- How to plot smoother curves in R
- Paste all possible diagonals of an n*n matrix or d
- ess-rdired: I get this error “no ESS process is as
- How to use doMC under Windows or alternative paral
- dyLimit for limited time in Dygraphs
- Saving state of Shiny app to be restored later
- How to insert pictures into each individual bar in
The loop assigns values to all elements in your object. 'a1' gets value '2'; 'a2' gets value '3'; etcetera.
We can use
mget
to get the values in alist
and then loop through the
list
and apply the function