How do I replace values in a matrix from an uploaded CSV file in R?
问题 These are the steps I took: 1) Read in CSV file rawdata <- read.csv('name of my file', stringsAsFactors=FALSE) 2) Cleaned my data by removing certain records based on x-criteria data <- rawdata[!(rawdata$YOURID==""), all()] data <- data[(data$thiscolumn=="right"), all()] data <- data[(data$thatcolumn=="right"), all()] 3) Now I want to replace certain values throughout the whole matrix with a number (replace a string with a number value). I have tried the following commands and nothing works