You could do something like this:
summed <- rowSums(zscore[, c(1, 2, 3, 5)])
More Related Contents:
- Compare two data.frames to find the rows in data.frame 1 that are not present in data.frame 2
- Repeat rows of a data.frame [duplicate]
- How to delete rows from a dataframe that contain n*NA
- Delete rows containing specific strings in R
- For each row in an R dataframe
- remove IDs that occur x times R
- How to remove rows with any zero value
- Collapse rows with overlapping ranges
- How to append rows to an R data frame
- Counting number of instances of a condition per row R [duplicate]
- How to delete groups containing less than 3 rows of data in R? [duplicate]
- Removing specific rows from a dataframe
- Deleting every n-th row in a dataframe
- Sum by two variables
- Drop unused factor levels in a subsetted data frame
- Use dynamic name for new column/variable in `dplyr`
- Changing fonts in ggplot2
- Error in plot.new() : figure margins too large, Scatter plot
- if – else if – else statement and brackets
- Use filter in dplyr conditional on an if statement in R
- Finding the index inside a vector satisfying a condition
- finding close match from data frame 1 in data fame 2
- aggregate() puts multiple output columns in a matrix instead
- select columns based on multiple strings with dplyr contains()
- Calculate number of days between two dates in r
- How to load data quickly into R?
- Extract the coefficients for the best tuning parameters of a glmnet model in caret
- Convert all data frame character columns to factors
- How to pass column name as argument to function for dplyr verbs?
- How to use data.table within functions and loops?