No need for apply()
, just use paste()
:
R> d <- c("Mon","Tues","Wednes","Thurs","Fri","Satur","Sun")
R> week <- paste(d, "day", sep="")
R> week
[1] "Monday" "Tuesday" "Wednesday" "Thursday"
[4] "Friday" "Saturday" "Sunday"
R>
More Related Contents:
- Concatenate row-wise across specific columns of dataframe
- Pasting elements of two vectors alphabetically
- how to apply a function on a data set?
- Is R’s apply family more than syntactic sugar?
- Is the “*apply” family really not vectorized?
- Paste multiple columns together
- suppress NAs in paste()
- Remove columns from dataframe where ALL values are NA
- How to use reference variables by character string in a formula?
- R Apply() function on specific dataframe columns
- subset a column in data frame based on another data frame/list
- Remove/collapse consecutive duplicate values in sequence
- Apply a function to every row of a matrix or a data frame
- Why is `vapply` safer than `sapply`?
- Is there a R function that applies a function to each pair of columns?
- Sum every nth points
- Why does as.factor return a character when used inside apply?
- apply a function over groups of columns
- rbind data frames based on a common pattern in data frame name
- Dataframe create new column based on other columns
- Last Observation Carried Forward In a data frame? [duplicate]
- Sorting rows alphabetically
- Concatenate rows of a data frame
- Paste all combinations of a vector in R
- use multiple columns as variables with sapply
- Paste/Collapse in R
- Applying a function to two lists?
- Is there a way to paste together the elements of a vector in R without using a loop?
- how to access global/outer scope variable from R apply function?
- apply() not working when checking column class in a data.frame