I have a vector which looks something like this, c(61,33,"67*",98,"32*", "73*"). I need to clean the data using R by transforming this into a vector without the extra *. The result in this example should be c(61,33,67,98,32,73).
We can use sub to remove the * by specifying fixed = TRUE as it is a metacharacter that denotes zero or more characters.
data = data[!is.na(data)]\ READ MORE
Yes there are so many ways:
and another ...READ MORE
You have various options to count the ...READ MORE
You can use complete.cases in the following ...READ MORE
The goal of this step is to ...READ MORE
You can just use the order function ...READ MORE
You can use the scan function in ...READ MORE
First see what rows meet t$ps04==1 & t$rectyp==1. ...READ MORE
You can use dimensionality reduction methods such as ...READ MORE
R offers a command to save its ...READ MORE