Questions tagged as 'r'

2
answers

How to remove a word from a string without changing larger words that contain it

I would like to remove a word from a string in R. I was doing the following: > s <- "ele esta bem mas tambem esta triste" > stringr::str_replace_all(s, "tambem", "") [1] "ele esta bem mas esta triste" So far, so good. The problem...
asked by 24.02.2016 / 14:30
1
answer

How to use the %% operator in R

What does the %<>% operator in R mean? What's your difference from <- ? Under what circumstances can it be useful?
asked by 12.06.2016 / 11:48
2
answers

How to know the day of the week in R?

Is there a package or function in R that lets you easily get the day of the week from the dates? datas <- c("2010-06-28", "2011-05-25", "2010-09-28", "2011-12-05", "2010-09-14", "2010-01-01", "2010-01-02", "2010-01-03", "2010-01...
asked by 20.01.2016 / 14:46
2
answers

Filter 5GB CSV file in R

I'm trying all ways to tinker with a 5GB file for my monograph. The code I'm trying to get into the R is as follows: > write.csv(subset(read.csv("enem.csv", header=TRUE), UF_ESC=="SP"), "filtro.csv", row.nomes=FALSE) I've tested with...
asked by 17.01.2016 / 01:53
1
answer

How do I export table in R in txt or csv?

I would like to know how do I export a generated data table within R to txt or csv format?     
asked by 27.04.2015 / 17:11
2
answers

R: problems with sort (NA)

I have a vector that I want to sort using sort but, in doing so, I do not see the missing values ( NA ). How to make? Thankful. > x [1] "b" "c" "a" NA NA "b" "c" "a" NA NA "b" "c" "a" > sort(x) [1] "a" "a" "a" "b" "b" "...
asked by 22.12.2015 / 15:17
3
answers

Web scraping with R

I'm trying to do a Web Scrapping of the following link: link I want to access all categories and extract a date frame with the name of all companies. If you click on the name of any of the companies will have some data like: Fancy na...
asked by 21.01.2016 / 13:28
1
answer

Extract information from lattes

Introduction Brazilian researchers have, since 1999, a website where they can post information about their academic career. This information is known as Currículos Lattes . I want to download a few thousand of these resumes and write, along...
asked by 18.04.2018 / 17:32
1
answer

Add row by row in a data.table in R

Is there any method that can be added row by row in a data.table in R without needing to use a 'for', so that the value of the next row in a column is the value of the previous row added with a different value for each line? Trying to solve a...
asked by 25.06.2017 / 09:03
1
answer

Text Position in pie chart in ggplot2

I have the following table Var1 Freq Percentual Até 50 anos 4657 2.98% De 51 a 60 anos 32009 20.47% De 61 a 70 anos 57368 36.68% De 71 a 80 anos 46075 29.46% Mais de 80 anos 16299...
asked by 06.07.2017 / 15:34