Farnoosh I want to start by appreciating your reply. Thank you so much.
I am waiting to know your plan why not give me pic
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.e
Hello,
To the OP:
The dollar sign is a meta character, so it must be escaped, that is what
was wrong with your code. The right regular expression would be
grepl("\\$", x)
When a regular expression doesn't work, try reading the help page ?regex.
Another good source you can try is
https://reg
Your message came through all messed up because you did not tell your email
program to use plain text format. This at best delays a responds and at worst
prevents us from understanding your question as you intended.
1) The columns became factors when you created the data frame because you did
n
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
wrote:
> Hello,
> I have a data frame with 400 columns and wanted to filter character col
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 t
5 matches
Mail list logo