Questions tagged as 'r'

2
answers

Questions when using the "rle" function

I'm using the rle function. x = rnorm(10,0,1) l = 1 teste = rle(x > l) evento = teste$lengths[teste$values=="TRUE"] I'm having trouble extracting the values from my x vector, which has test $ values == "TRUE". That is, I want to know th...
asked by 25.09.2015 / 01:32
1
answer

Error with the factor analysis command

The factanal() factorial command shows a meaningless error message. I have to perform the factorial analysis, I want to compare the scores obtained when using the solutions by the variance matrix and the correlation matrix. Array er...
asked by 15.09.2015 / 01:31
1
answer

How to install the plotKML package?

I want to install the following package in R link the following message appears: Error in loadNamespace (j
asked by 23.10.2015 / 23:09
1
answer

Redeem time period in r

Hello, I have a large series of temporal data. I have over 100 years to work. I need to recapture (abstract) only the summers of each of the years, and I do not know how to do in R. For example, I need the time period 20/06/2015 to 20/09/2015, a...
asked by 01.10.2015 / 15:19
1
answer

How to test multiple data.frames and establish a maximum score of the tests for a certain position? #R

Given the following data.frames: library(zoo) A<-data.frame(x1=(0:9),x2=rep(0:1,5),x3=rep(0:4,2)) B<-apply(A, 2, function(x) rollapply(x, width = 2, FUN = sum, fill = NA, align = 'r', na.rm=TRUE)) C<-apply(A, 2, function(x) rollap...
asked by 01.02.2016 / 08:30
1
answer

Even if you use "na.rm = TRUE", the error message for the missing values

When I use the command for complex sample mean, a warning appears that there are missing values in weights, however I am using the na.rm = TRUE option. Does anyone know what's going on? Here's the snippet: svymean(basedados$variavel...
asked by 30.12.2014 / 16:25
1
answer

R filter sets

I'm taking the first steps in programming and with the R language and I have the following doubt I have a birthday dataframe with the following format Months | Person April Joao March Ana April Carlos June Joan March Pedro...
asked by 08.01.2015 / 16:23
1
answer

Loading RData files from the directory itself .R

How to load RData files that are in the same directory as the .R file in RStudio? Here, for example, there is the line: load('teste.RData') When loaded, it returns ... Erro em readChar(con, 5L, useBytes = TRUE) : não é possível...
asked by 23.09.2014 / 19:12
1
answer

Error in package installation?

I'm trying to install this following map generation package but it's giving the following error install.packages ("maptools", dep = TRUE) Installing package into 'C: /Users/rafael/Documents/R/win-library/3.0' (as 'lib' is unspecified) --- Pl...
asked by 23.09.2014 / 20:10
1
answer

Correlation Matrix in R (cov.wt)

In the cov.wt function in R is it possible to get only the Correlation matrix? cov.wt = Returns a list with estimates of the weighted covariance matrix and the mean of the data, and optionally of the (weighted) correlation matrix .     
asked by 12.08.2014 / 22:24