Questions tagged as 'rstudio'

3
answers

Organize data in Excel to open as table in R?

I have a file with 50 comments and 3 variables in Excel (.xlsx) file, and I made it into .csv. I used banco1<- read.csv("teste1.csv") to create the table in R, but my 3 variables appear in the same column. How do I make them appear sep...
asked by 29.09.2014 / 05:19
1
answer

RStudio: does not automatically load variables in environment

Whenever I start RStudio some variables appear in environment . Is there any way to remove them automatically without using the famous rm(list=ls()) ? Thank you!     
asked by 07.12.2015 / 03:33
3
answers

Fill column of a data frame with data from another date frame in R

I have the following df (data1): ITEM CLASSIFICACAO 123 AZUL 456 AMARELO 789 234 VERDE 345 PRETO 456 567 678 ROSA I need to fill in the blank lines of the CLASSIFICACAO column using another data frame: ITE...
asked by 14.09.2018 / 22:02
1
answer

Recursion in R error

I have the following recursive function: tamanho <- function(v){ if (is.null(v)){ return(0) } i <- tamanho(v[-1])+1 return(i) } I'm using RStudio, and when I call the function with this example: tamanho(c(1,2,3,5)) gi...
asked by 21.10.2018 / 03:03
1
answer

Error "invalid input '..' in utf8towcs" with "read.csv"

I have a .csv database that gathers posts from both Facebook and twitter. For reading the bank in R, the code I have used is bancodedados <- read.csv("nomedobanco.csv", sep=";", encoding="UTF-8") The code loads the database almost to t...
asked by 28.01.2015 / 14:12
2
answers

Filter Different texts in different positions in R

Good afternoon. I have the following data: NOME <- c("MARIA 1001", "MARIA 1002A", "JOSE 1003B", "PEDRO 1003", "CARLOS 1019J", “ANTONIO 50”, “MARIA 80”) VALOR <- c(10, 20, 30, 40, 50, 60, 70) dados <- data.frame(NOME, VALOR) I need...
asked by 28.12.2017 / 15:14
2
answers

Convert a list with dataframes of different rows into independent dataframes [R]

I have a list of 3 dataframes, which are derived from the split function: > split $'1' bin group1 group2 missing score1 score2 gender size score3 income city 0 1 1 NA 3 2 M S 4 1605....
asked by 21.08.2018 / 03:35
1
answer

Problem creating a data.frame

I want to export multiple results to excel and for that I need to first leave them in the ideal format, however I am facing problems because I want them to be stacked in a single column. This is an example to show what I want done. x=c(1,2,3)...
asked by 07.11.2018 / 16:57
2
answers

Attempting to generate a graph of a time series

That's what I did .. #Lê a base de dados ano1<-read.csv("os dados abaixo...",header = TRUE ,sep=";", row.names=1) #Cria a série temporal ano<-ts(ano1[,1],start=c(2009,1), end=c(2010,12),freq=12) #plota a série plot(ano,ylab='indice', x...
asked by 07.06.2016 / 20:38
1
answer

Insert graphics automatically into github pages

When creating a .md file for the _post folder of github pages with rstudio, the graphics generated with the R commands should be inserted one by one via the command: ![center](/nome_pasta_imagens_dentro_da_master/nome_da_figura.png) Or is t...
asked by 08.09.2016 / 00:29