Reputation: 1
I imported a file into R and let's say the row name is "Hours Studied". Instead of having Hours Studied imported into R, it imports Hours Studied
with the annoying ` `
on top of the name. How do I remove it?
I tried doing rownames(data)<- "Hours Studied". But it still returns `Hours Studied`
instead of the desired Hours Studied.
Attached an image in this post for clarification
Upvotes: 0
Views: 92
Reputation: 548
If you use interupted variable names with spaces (e.g. 'my variable'
) rather than continuous variable names with dashes or underscores (e.g. my_variable
, my-variable
), R will put "backticks" around the variable or column name to make sure it's clear what is included in the variable name. If you export the data or plot the data in R those ticks will not be present in the displayed variable name.
Upvotes: 1