Posts by Tadeu • 143 points
8 posts
-
0
votes1
answer146
viewsQ: Transpose column to row with condition in r
I have a file with a column and I would like to transfer it with one condition: the first number that appears and the subsequent lines should be in a row df <- data.frame(Coluna = c(1, "ALDO…
-
0
votes1
answer50
viewsQ: Word combination identification in R
I have hundreds of sentences like these below. And I would like to identify the phrases that contain the words Phone and delete. But these two words must have only one term between them, in this…
-
0
votes1
answer221
viewsQ: Fill cells with AN by an annual logical sequence in R
I have a dataframe with 25 people and their respective ages from 2012 to 2015, but in a few years the ages were not filled. id<-c(1:25) idade_2012<-c(21, 18, 19, 25, 20, 12, 12, 13, 14, 29,…
-
4
votes2
answers171
viewsQ: Identify cases with multiple conditions in multiple columns in R
I have a dataframe with 20 students and I need to identify the students who attended stage 43 for two years or more. aluno <- c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,…
-
2
votes1
answer58
viewsQ: Degree of class grouping
I have several classes and each of these classes is composed of dozens of students, and each year these students change classes. So I would like to calculate the degree of grouping that a class…
-
2
votes1
answer284
viewsQ: Select ID vectors with certain characteristics in R
I have a data frame with four columns of values for each ID and need to create a new df excluding Ids whose vectors have more than one zero or more than one NA. I created the DF library(dplyr)…
-
1
votes1
answer5247
viewsQ: Calculate mean, standard deviation and coefficient of variation in historical series in R
Good morning, I need to generate the mean, standard deviation and coefficient of variation of the data frame below, from the mat13 to mat16 columns, as below: library(plyr) co_entidade<-c(23, 40,…
-
2
votes1
answer2622
viewsQ: How to place values in faceted bar charts in R?
I am trying to generate a bar chart faceted with R, according to data frame and below commands: ############################################### ######___PACKGES UTILIZADOS_____###############…