Questions tagged as 'r'

2
answers

Argument is neither numerical nor logical: returning NA

Searching for an answer about the error I encountered when trying to parse data in R, I found a case very similar, but not identical to what I came across. So I decided to write my question in a systematized way. ROUTINE in R: # pr é o nome...
asked by 16.08.2018 / 17:06
1
answer

Error in package 'topicmodels' [closed]

I'm using RStudio to make my scrits. I try to install a package named topicmodels through the command install.packages("topicmodels") However, I get the following error message: ERROR: dependency ‘tm’ is not available for package ‘...
asked by 22.08.2018 / 02:55
1
answer

How can I assign a variable to a table? [closed]

This table is only in one column! I need to assign the variable age, to do the average, variance, ..., but I can not do this because they are in the same column. ID, Name, Sex, Age, Height, Weight, Team, NOC, Games, Year, Season, City, Sport...
asked by 02.09.2018 / 18:11
1
answer

Turn chr into team in R

I would like to transform the variable "Time" (which is in chr format) into hour format. The data looks like this:     
asked by 16.07.2018 / 21:00
1
answer

How to ignore and not iterate over a for in R

I am using this command to compute 4 values extracted from a function summary without (sem_smry). 100 attempts are made where, if it reports an error, the attempt is counted but not computed. I need to count the "failed" attempts but do not get...
asked by 30.08.2018 / 16:13
1
answer

How to insert a caption on a map in R (with the RColorBrewer package)?

I did a fictitious k-means cluster analysis. I want to create a caption (cluster1, cluster2 and cluster3), which is represented by the variable "kmeans" (clusters formed). I do not know if it would be possible to enter a scale. If possible, how?...
asked by 17.07.2018 / 05:23
1
answer

Insert the names / values of 'rownames' as a new variable in dataframes of a list

Suppose n dataframes within a list. Each of these dataframes has different lines. For example, in a dataframe, rownames are characters (car brands), and, on the other, rownames are enrollment numbers in a hospital. My goal is to...
asked by 11.09.2018 / 03:24
1
answer

Bootstrapped confidence interval for GLMM model parameters

I am having trouble generating a confidence interval that I was asked to when is a GLMM Normally if it were not binomial would do for example like this: library(boot) library(lme4) library(dplyr) dat <- data.frame(x = runif(100, -2,2),in...
asked by 06.02.2018 / 15:08
1
answer

How to interpolate soil depth values using "spline"? Or using the "aqp" package?

Hello, I would like to interpolate the soil depth values in columns "top" and "bottom" , (every 5 units) in the soil data, such as in the dataframe: id_num id_name horiz top bottom K Mg Ca CEC_7 ex_Ca_to_Mg sand silt clay...
asked by 26.01.2018 / 14:44
2
answers

Language R - Use of function to avoid repetitions of code

I'm developing a program in the R language, it compares data of two data.frame and writes to a third, the program has several conditional structures of type else if within two repeat structures of type for , being if any of th...
asked by 09.04.2018 / 23:28