Questions tagged as 'r'

1
answer

Use VIF test

I'm trying to run the VIF test for a two-stage MQO model, but the following warning appears:   Warning message: In v1 * v2: length of largest object is not   multiple of the length of the smaller object Follow the template: lm(MEDIA_9EF...
asked by 24.02.2018 / 23:43
2
answers

Distinct Counting in R

I'd like some help to construct a distinct count of a data frame. Here are the data: Filial Matrícula Valor ABC 100 R$ 500,00 XYZ 200 R$ 850,00 XYZ 100 R$ 320,00 JCT 300 R$ 512,00 JCT 300...
asked by 20.11.2017 / 12:32
1
answer

How to create png file for multiple graphics using x11 in R?

I was able to plot and generate files (png) of the simple graphics, but in case of several graphics in the same window (as in the case of x11) I can not save the file in the directory. png(filename="box_sv_sst_mean.png",width=2034,height=2034,u...
asked by 25.10.2017 / 13:17
1
answer

Plot of the distribution of the degrees of a graph in R

I have a graph and I want to plot the distribution of degrees. Example: > library(igraph) > g <- make_ring(10) > degree(g) [1] 2 2 2 2 2 2 2 2 2 2 > g2 <- sample_gnp(1000, 10/1000) > degree_distribution(g2) [1] 0.000 0.0...
asked by 12.08.2017 / 16:00
1
answer

Error importing .csv data into RStudio

When I'm going to import and create a file my data to R it's error ... I tried the following path: melipona <- paste(system.file(package="dismo"), "/ex/Melipona.csv", sep=";") melipona<-read.csv(melipona,header=TRUE,sep=";") Th...
asked by 14.07.2017 / 17:04
1
answer

"Error: \ caption outside float" in R Markdown

When I try to compile my Markdown R code, I get the following error:   ! Package caption Error: \ caption outside float.       See the package documentation for explanation. Type H     for immediate help.   ...   l.336 \ caption       pan...
asked by 19.09.2017 / 22:01
1
answer

Replace array value (R)

I need to replace the value that appears on the main diagonal of my matrix with another, how to proceed?     
asked by 30.06.2017 / 17:01
1
answer

Create an exploratory chart type weight ~ collection filtering treatments in the R

With the tapply function I can know their values: tapply(peso, list(coleta, tratamento), mean, na.rm=T) tapply(peso, list(coleta, tratamento), sd, na.rm=T) sd Biofloc Control A1 NA NA A2 20.69427 26.05011 A3 18.70375 29.34639...
asked by 12.06.2017 / 14:03
1
answer

Play 3d graph with contour lines in software R

I tried to add contours in my plot as in the second figure below, but I could not, does anyone know how I should proceed? #Function density probability library(pbivnorm) bsb <- function(t1,t2){ a1 <- sqrt(phi1/2)*(sqrt(((phi...
asked by 06.05.2017 / 19:45
1
answer

How to stratify / divide a data.frame according to categories of a variable in R?

I'm running a linear regression model in R and would like to perform stratified analysis by categories of a variável X with 4 categories ( X1 , X2 , X3 and X4 ). I thought of stratifying data.frame by th...
asked by 08.03.2017 / 20:42