Questions tagged as 'r'

1
answer

Package bRasilLegis [command "getDetailsDownload"]

I need to collect the data of the deputies who were present in commissions, positions, etc. However, I can only do this with one deputy at a time. Is it possible that I can choose all at once? library(bRasilLegis) dep <- obterDetalhesDeputa...
asked by 02.01.2017 / 23:42
1
answer

Logistic regression with non-binary variable

I need to make a logistic regression classifier to classify this categorical variable that can have 14 different values. Does anyone know if it is possible to do this with glm () or if I have to use another function (and what)?     
asked by 05.01.2017 / 23:27
1
answer

How to delete list elements through a condition?

I used the following function: splitfile<-split(training,list(training$group1,training$city)) and this returns me a list of dataframes with different rows, based on the variables I selected. However, a dataframe with 0 rows is returne...
asked by 02.11.2018 / 15:05
1
answer

How to remove the rows based on the values of another variable?

Consider the dataframe: data<-data.frame(a=c(1,3,4,5,6,NA,6,NA),b=c(1,NA,NA,4,6,7,NA,1)) I want to delete the entire line when NA exists in variable 'a' . So, what I hope is: data a b 1 1 1 2 3 NA 3 4 NA 4 5 4 5 6 6 6 6 N...
asked by 05.10.2018 / 18:16
2
answers

Data window moving in time (t)

I want to make a Recursive prediction. I need every month (t) to move the data window from the last month to the next in a period (this period, that is, t + 1). dados<-read.table("C:/Biomedica/Doença/evolmensal.txt", header=T, dec=",") dado...
asked by 25.12.2014 / 23:36
1
answer

Apply a function using some columns of all rows in a Dataframe (r)

I have the following Dataframe: AVG_VOLUME AVG_RETURN VOL PRICE SPX Index 500000 0.01 0.08 2082 KR7000270009 6000 0.02 0.09 102 KR7005930003 7000 0.02 0.08...
asked by 15.04.2016 / 21:34
1
answer

How to check if a polygon is regular or convex

Is there a function in the R that checks whether a polygon is regular or not and some that checks whether it is convex or not? If either answer is no, any ideas? As I thought: #Por exemplo um quadrilátero, a primeira coluna é x e a segunda...
asked by 27.04.2016 / 17:53
1
answer

How to fit a Lowess curve into longitudinal data using R?

I have the following data: structure(list(X26 = c(1.69, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), X27 = c(0.94, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N...
asked by 20.06.2016 / 16:31
1
answer

Including columns in a dataframe in R using a rule

This is my dataframe: df<-as.data.frame(matrix(rexp(200, rate=.1), ncol=10)) colnames(df)<-c("one","two","three","four","five","six","seven","eight","nine","ten") This is the index I will use as an example: index<-c(1,2,3,4,5,6,7...
asked by 20.09.2018 / 00:00
2
answers

How to group the microdata of people from the census by residence?

I am trying to answer the following question: How many couples with children under 18 do both parents work out? Given a% census of people in the 2010 census (such as that of Acre ), first thing I did was filter the table by couples with chil...
asked by 13.11.2015 / 15:54