Re: [R] GSUB and Data.frame format lost

2014-08-19 Thread Ivan Calandra
Hi, If I understand you well, the problem is that DataGoogle2 is a 1-column data.frame and this is expected based on your code! I think you want something like this to change the 1st column of the data.frame: DataGoogle2 <- DataGoogle1 DataGoogle2$Campaña <- gsub("facebook-Ads1", "FBAds", Da

[R] GSUB and Data.frame format lost

2014-08-19 Thread Omar André Gonzáles Díaz
Hi all, please, i'm trying to understand how using "Gsub" for some search and replace of text, makes my data frame lost it's format. This is my code: DataGoogle1 <- read.csv(file = "DataGoogle2.csv", header = T, stringsAsFactors = F) head(DataGoogle1) Result 1: CampañaV