Open bayniyazov0518 opened 3 years ago
please help me
Hi, i think this is the correct answer:
cnames <- c("patient", "age", "weight", "bp", "rating", "test") # create the character vector with the names
colnames(my_data) <- cnames # assign the cnames vector to the data frame you created earlier
my_ data # see the results
I hope this helps :)
(i am a beginner following the steps. this worked for me, i hope it's okay)
thanks
Since we have six columns (including patient names), we'll need to first create a vector containing one element for each column. Create a character vector called cnames that contains the following values (in order) -- "patient", "age", "weight", "bp", "rating", "test".