use assign
as in:
x <- 1:10
for(i in seq_along(x)){
assign(paste('X', i, sep=''), x[i])
}
More Related Contents:
- Can lists be created that name themselves based on input object names?
- Generate multiple graphics from within an R function
- Explain a lazy evaluation quirk
- Tools for making latex tables in R [closed]
- How can I count runs in a sequence?
- Remove an entire column from a data.frame in R
- What does the dot mean in R – personal preference, naming convention or more?
- How to strsplit different number of strings in certain column by do function
- How to avoid warning when introducing NAs by coercion
- Why does R use partial matching?
- How can I make a list of all dataframes that are in my global environment?
- How to make tibbles display significant digits
- sum cells of certain columns for each row
- Rolling join on data.table with duplicate keys
- How to source R Markdown file like `source(‘myfile.r’)`?
- What IDEs are available for R in Linux? [closed]
- Eliminating NAs from a ggplot
- Insert blanks into a vector for, e.g., minor tick labels in R
- Setting y axis breaks in ggplot
- R knitr Markdown: Output Plots within For Loop
- Adding a company Logo to ShinyDashboard header
- caught segfault error in R
- When should I use the := operator in data.table?
- How to detect the right encoding for read.csv?
- How to get ranks with no gaps when there are ties among values?
- Improve centering county names ggplot & maps
- How to find the indices of the top 10,000 elements in a symmetric matrix(12k X 12k) in R
- Is there a way to output text to the R console in color
- Split a string every 5 characters
- Using a static (prebuilt) PDF vignette in R package