Questions tagged as 'r'

1
answer

NaNs warning on ZAP model

Trying to build a model inflated to zeros R gives me the following message:    Warning message: In sqrt (diag (object $ vcov)): NaNs produced That basically assumes that most of my statisticians appear as Na. The recommendations I read in...
asked by 19.06.2017 / 12:47
1
answer

Uniting data frames in R studio

You could help me with an example using the functions right_join or left_join to join two data frames, but it will also be possible to show an unrelated variable between those two data.frames, because when they are not linked, NA     
asked by 25.06.2017 / 19:46
2
answers

Use of dplyr and summarize with missing values

I have a set of countries in which I observe the suicide rate over time. I want to get the average of suicide rates by country. I have tried to use this code, and for that, as there are lost values, I have also included na.rm, but it gives me th...
asked by 07.06.2017 / 16:57
1
answer

Creating functions in Rstudio

From the following vector: Lagos <- c(41,72,8,93,4,37,73,190,45,22,19) I want to create a function that shows in the console the mean and standard deviation of that vector and that optionally can change the mean by the median...
asked by 09.06.2017 / 16:29
1
answer

R - Twitter - json - lists

I've done a Twitter extraction of about 3000 messages, including retweets, and now I want to analyze them. For this I saved the file as UFT-8 format without BOM. The original extraction I did it in the following way: library(streamR); source('...
asked by 25.05.2017 / 15:43
1
answer

List modis files per day

I need to make a fusion of raster images with terra and aqua satellites of modis in R. To carry out the cycle I must have the same length of the satellite vectors, however for terra I have 6031 images and for aqua 5277. I do not know how to crea...
asked by 05.03.2017 / 06:05
0
answers

How to identify Shiny elements with javascript

Hi, I'm trying to put together a shiny application and add javascript. After spending hours researching the web I give up, I have not the remotest idea of how javascript works with R. I do not understand how I can communicate between elements of...
asked by 08.03.2017 / 12:09
0
answers

How to pass the following pseudocode (Algorithm Top down Time Ratio) to R language (R-Project)

I am using a database in Postgresql of trajectories vehicles and I want to use the following algorithm in R to compress the trajectories. #algoritmo top-down time-ratio procedure TD_TR(s,dist_threshold) if len(s) <= 2 then return s e...
asked by 08.01.2017 / 18:13
0
answers

Error when including package in R-studio

I want to include some packages in R-studio and it gives me a problem of writing and permissions. Use windows 10 and version 3.2.2 of R    install.packages (c ("ggplot2"))   Warning in install.packages:     'lib="C: / Program Files / R / R-3....
asked by 30.11.2016 / 11:52
1
answer

Combinatorial letters in R

I have letters, for example: (abc) I want your combinations. I need a vector with output ("a-b" "a-c" "b-c") . I use the function: CL<-combn(letters[1:3], 2,simplify = T) CL.1 <-c(as.vector(CL)) CL.1 But I can not g...
asked by 09.10.2016 / 23:42