Questions tagged as 'r'

1
answer

Graph is not outputting

library(shiny) ui <- fluidPage( titlePanel("Funcao Poder"), sidebarLayout( sidebarPanel( sliderInput("n1", "Tamanho da amostra:", min = 1, max = 50, value...
asked by 21.06.2018 / 00:24
1
answer

Graphics on panels in ggplot2

I have 25 species and I would like Just write a script where I could have a separate chart for each species (in total there would be 25 small graphs on a 5x5 grid). I'd also like to do two different plots for the savannah and forest;...
asked by 26.05.2018 / 16:25
3
answers

Loop in R with indexing and array

We are trying to use the for command to run a function y (say y=5+3x+4z ) by varying the values of z (say that z is a combination of 5 z=c(1,2,3,4,5) ) and that x is a normal size distribution 1000. After printing the values w...
asked by 29.03.2014 / 22:06
1
answer

Remove duplicate cases and keep specific values from another variable

Consider the following situation: I have a database with two variables. The first is a variable with duplicate values (eg CPFxxx.xxx.xxx-xx appears 14 times, CPFxxx.xxx.xxx-xx appears 18 times, and so on). The second variable is the event occ...
asked by 10.10.2018 / 21:49
1
answer

Saving rows of a data frame based on the values of a column of another data frame

I have a dataframe with 50 rows and 10 columns and one with 10 rows and 5 columns, the first column of both dataframes can have equal values. How do I select and save rows, only, from the first date frame following the condition that the row...
asked by 30.10.2017 / 06:15
1
answer

Column Names Array using R

This is my array in R: n_forward=50 matriz=matrix(0,nrow=length(1:n_forward),ncol=16) The number of rows depends on the command n_forward . From here I want to name the lines at t + 1, t + 2, ...., t + (n_forward) Is there any...
asked by 01.11.2017 / 14:44
1
answer

Group columns in the R bar chart

I need to generate a bar chart with the following data: structure(c(38792L, 1227L, 23220L, 4177L, 893L, 331L), .Dim = 6L, .Dimnames = structure(list(c("Canvas para Android", "Canvas para iOS", "Chrome ", "Firefox ", "Navegador não reconhecido"...
asked by 06.11.2017 / 13:04
1
answer

Display the position of a given value in a vector in the R

I started studying R in a short time and I have studied this language a lot. However, I'm having trouble getting the position of a vector, ie the order in which a certain value is written to that vector. Eg: > vector
asked by 22.10.2017 / 00:55
1
answer

Create boxplot graph of values in classes

I have these values in a dataframe: structure(list(NotaFinal = c(23.95, 25.4, 31.55, 25.4, 27.8, 27.3, 31.85, 20.45, 31.95, 28.55, 20, 24.95, 14.45, 22.55, 25.65, 10.35, 27.95, 21.45, 18.45, 21.1, 12.3, 22.65, 30.35, 27.4, 12.85, 21.95, 26....
asked by 14.11.2017 / 16:16
2
answers

Replace NA in R language

Good afternoon, I would like to replace "NA" (Worthless) with a word. I have the following data: NOME TIPO VALOR ABC INTERNACAO 10 ADD 20 AFF CONSULTA 30 DDD EXAME 40 RTF 50 DRGG...
asked by 01.12.2017 / 17:49