Once again here trying to do things without the use of for , I have a problem that has a solution with for but I would like to give it a focus without for .
The problem is that I have some data with days and I want to creat...
how can I get the str_replace_all when I make the first substitution (match) and stop looking for more matches in the dictionary
code that I have.
library(stringr)
x <- c("VALLE PINO CORSO","LA PAZ","PAZ")
dictionary bad words (malpa...
I have a data file that, minimized (the original file contains more rounds and levels of "Content"), responds more or less to the following structure ( data ):
Ronda Contenido Salida
1 0 [1,1,1,1]
1 0 [1,1,1,1]
1...
I am trying to read the table of the history of the monthly minimum wage of Colombia, the Bank of the Republic publishes the history in the following link
Minimum legal salary in Colombia but I can not get the correct reading of the table. Any...
I have a data matrix (dfA) with several columns: province (dfA is a subset for one of the provinces), municipality, crop, number of farms, area, production ... And I want to calculate the number of total farms , total area, total production ......
I have a dataframe with the following format:
And I would like to get a dataframe with the following format:
That is, the unique names would be the identifiers by rows and the unique events the identifiers by columns, so that y...
Hi I am trying to find the names that are the same between the two columns as the following example.
[,1] [,2]
[1,] "jara" "moreno"
[2,] "moreno" "lopez"
[3,] "diaz" "Swanson"
[4,] "powell" "jara"
[5,] "Mckin...
I open the question to have a reference of the available options, in Spanish.
Suppose we have a data set like the following:
set.seed(2018)
mi_df <- data.frame(stringsAsFactors = F,
var1 = rnorm(50),...
I am interested in eliminating the O of each word, except that that word is HELLO .
I'm trying this but it does not work for me:
a <- c("HELLO DO","DO HELLO XO","HO")
gsub("[^HELLO]O\>","",a)
[1] "HELLO " " HELLO " "HO...
I would like to sketch in the map of Spain in R and add some points in certain coordinates that I have in a CSV file;
how are you:
Aranjuez<-39.595520, -3.391830
San Martin de la vega<- 40.225155-3.530613
Ruta...