Displaying 2 results from an estimated 2 matches for "drop_dollar".
2018 Apr 18
0
Identifying columns with specific character
Hi Farnoosh,
Perhaps this will help:
drop_dollar<-function(x) return(as.numeric(as.character(gsub("\\$","",x))))
sapply(My.Data,drop_dollar)
Jim
On Thu, Apr 19, 2018 at 7:23 AM, Farnoosh Sheikhi via R-help
<r-help at r-project.org> wrote:
> Hello,
> I have a data frame with 400 columns and wanted to filter cha...
2018 Apr 18
3
Identifying columns with specific character
Hello,
I have a data frame with 400 columns and wanted to filter character columns with "$" in it.For example:?>? x <- c("$5", "$89", "$10", "$34")??>? y <- c(1:4)>? My.Data <- data.frame (x,y)> My.Data? ? x y1? $5 12 $89 23 $10 34 $34 4
I want to detect the columns with $ and remove the $ from the selected columns.I have