Questions tagged as 'r'

1
answer

problems with tryCatch

Good, I have a code in which by means of a loop they are opened and analyzed files that appear in a list. As I am going to have to analyze several files I want to print the name of the file that has problems to open. A problem that is common for...
asked by 12.12.2017 / 11:12
1
answer

Problem with highchartr, insertUI and removeUI in Shiny R. Error in shinyapp.js

Hi, I'm all working with an application shiny with a navbarPage several tabsetPanel . I would like the ui of each tab panel to be temporary, with this I mean that I hope to get the application to only load the...
asked by 04.10.2017 / 03:50
2
answers

R: Generate values in new columns in Dataframe from column names

Greetings to all, You see, I have a large dataframe, and the names of the columns have a format type "XXX_YYY_ZZZ", being able to take XXX, YYY or ZZZ different categories / factors. I would like to make a dataframe of only 4 columns, being t...
asked by 28.09.2017 / 14:56
1
answer

Treatment of missings and final layout of r a excel

I have a problem when dealing with the missings in R and then extract an Excel file without the missings, here are the data I want to manipulate col1=c("Sujeto1","Sujeto2","Sujeto3","Sujeto4","Sujeto5","Sujeto6") col2=c("A",NA,NA,"G",NA,NA) co...
asked by 01.03.2018 / 19:40
3
answers

Change the value of a variable if it meets a condition in R

I need to change the value of a variable. One of them is called Village and one of them is called site . One of the Villages that is called esperanza_paleta has value 5 in variable site and I want that 5 chan...
asked by 24.08.2017 / 18:53
1
answer

Create map in R with ggmap

I have a database that every time an issue is generated creates a new entry, one of the parameters I have is latitude and longitude. I want to create a code in R that takes those values of latitude and longitude and generates a map of Mexico tha...
asked by 16.10.2017 / 23:05
2
answers

Instaling factoextra R package- Installing the R package factoextra

I have been trying to install the factoextra (R) package without success. This is the code I've been using so far: library("devtools") install_github("kassambara/factoextra") And this is the problem:    library ("devtools")       insta...
asked by 11.04.2016 / 00:31
1
answer

Potential trend line using ggplot

These are my data Qmodelo <- c(10,25,50,75,100,125,150,175,200,225,250,275,300,325,350,375,400,425,450,475,500) Hmodelo <- c(73.57,111.39,152.31,181.50,204.73,225.42,243.94,259.77,273.95,287.90,299.20,309.62,319.15,328.17, 336.72, 344....
asked by 23.08.2016 / 20:48
2
answers

"Format of predictions is invalid." error in R

I'm trying to draw the ROC curve for the results of my Naive Bayes classifier. attach(TrainFactor) NB <- naiveBayes(Result~., data=TrainFactor) NB_pred <- predict(NB, TestFactor, type = c("class")) NB_table <- table(NB_pred, TestFact...
asked by 31.03.2016 / 16:59
2
answers

model geometric distribution

What command in R studio should I use for the next case? On the roll of a die, count the number of times the die is rolled until it rolls 6. I need to model a geometric distribution for 10000 releases assigning different probabiliti...
asked by 31.08.2018 / 18:16