Using lapply over the names of spt1 will allow us to access the dataframes in spt1 and the name that we can use in paste to create our files.
lapply(names(spt1), function(x){write.table(spt1[[x]], file = paste("output", x, sep = ""))})
You could add a common extension in the paste if you want.
Related Contents:
- Split data frame string column into multiple columns
- How to split a data frame?
- Split a large dataframe into a list of data frames based on common value in column
- Calculate the mean of every 13 rows in data frame
- Splitting a dataframe string column into multiple different columns [duplicate]
- Split data.frame by value
- Split up a dataframe by number of rows
- Splitting a string into new rows in R [duplicate]
- Splitting a large data frame into smaller segments
- Split Data Frame into Rows of Fixed Size
- Extract a part of a data frame by selecting specific observations of a column in R [duplicate]
- How to sum a variable by group
- Split comma-separated strings in a column into separate rows
- Select the row with the maximum value in each group
- Quickly reading very large tables as dataframes
- Counting unique / distinct values by group in a data frame
- Convert a list to a data frame
- How to combine multiple conditions to subset a data-frame using “OR”?
- Order data frame rows according to vector with specific order
- Fastest way to replace NAs in a large data.table
- Split string column to create new binary columns
- Select groups based on number of unique / distinct values
- How to plot all the columns of a data frame in R
- Dictionary style replace multiple items
- Repeat rows of a data.frame [duplicate]
- Rename multiple columns by names
- Select rows with min value by group
- How do I extract a single column from a data.frame as a data.frame?
- Combine two or more columns in a dataframe into a new column with a new name
- dplyr: nonstandard column names (white space, punctuation, starts with numbers)
- Call apply-like function on each row of dataframe with multiple arguments from each row
- Match values in data frame with values in another data frame and replace former with a corresponding pattern from the other data frame
- Deleting reversed duplicates with R
- Last Observation Carried Forward In a data frame? [duplicate]
- Omit rows containing specific column of NA
- Collapsing data frame by selecting one row per group
- Get last row of each group in R [duplicate]
- Interpolate NA values in a data frame with na.approx
- How to sort a data frame by date
- R self reference
- How to delete rows from a data.frame, based on an external list, using R?
- Subsetting a data frame based on contents of another data frame
- Remove all rows where length of string is more than n
- Divide each value by the sum of values by group
- Merge dataframes of different sizes
- R semicolon delimited a column into rows
- Read and rbind multiple csv files
- write.csv for large data.table
- How can I change XTS to data.frame and keep Index?
- Select last non-NA value in a row, by row