Questions tagged as 'r'

1
answer

In R, how to transform tibble into a dataframe

I have a tibble structure result of the following script, using the purrr package: data %>% group_by(REGIAO , V1023) %>% nest() %>% mutate( teste = map(data, ff)) Where ff is a particular function that I have created to apply to ea...
asked by 01.12.2017 / 14:54
1
answer

How to get the table with the data that generates the graph with the DECOMPOSE command in the R

Good afternoon, everyone. I generated this chart with the "decompose" command in R. What I would like to know is how to extract the data from each of these components into a table. For example, I want to generate the "random" chart in Excel and...
asked by 13.09.2017 / 21:44
2
answers

Join for unequal records in R

I have two data frames called employees and employees. nome.empregado <- c('Renato', 'Miguel', 'Paulo', 'Patrícia', 'Inês', 'Saulo', 'Diego', 'Maria', 'Jose', 'Julia', 'Tiago') idade <- c(30, 31, 29, 30, 25, 30, 30, 35, 24, 31, 29) em...
asked by 28.12.2017 / 20:40
1
answer

How to transpose rows into columns (and vice versa) and save to a new database in R

My database has 10 cases and 6 variables. I want to transpose the cases in column and save this transposition in a database.     
asked by 01.04.2018 / 21:02
1
answer

Include javascript in Shiny

I would like to include the event "Restore column visibility ( link ), the code would be this below: $(document).ready(function() { $('#example').DataTable( { dom: 'Bfrtip', buttons: [ { extend: 'colvis',...
asked by 01.06.2017 / 20:04
1
answer

Strange result in the to.monthly (quantmod package) cut series

Problem with my to.monthly. It cuts my dataset, I do not know why. ####install.packages("quantmod") library(quantmod) ####install.packages("PerformanceAnalytics") library(PerformanceAnalytics) ####install.packages("zoo") library(zoo) ####Defi...
asked by 01.06.2017 / 05:15
1
answer

How to install the ajdamico package? [closed]

I tried, but: Downloading GitHub repo ajdamico/lodown@master from URL [...] Installing lodown Downloading GitHub repo jimhester/archive@master from URL [...] trying URL [...] Error in utils: download.file: cannot open URL 'https://cran...
asked by 03.10.2017 / 05:22
1
answer

Text position in graphic using ggplot2

I need to adjust the position of a text in the bar chart so that it is above the bar. Below the code used base.total %>% group_by(SEXO, REGIME.JURIDICO.FINAL)%>% count() %>% ggplot(., aes(x=reorder(SEXO, -n), y=n, fill = REGIME....
asked by 04.08.2017 / 14:23
1
answer

Graph with the same color of lines for factors

I have a consumption data frame (DF) per animal per day Below is the data below for only two animals Animal Dia Consumo 5 9 2533.96 5 10 2329.06 5 11 2943.79 5 12 3361.62 5 13 2890.82 5 14...
asked by 08.02.2018 / 15:00
1
answer

How to smooth this graph in R / Rstudio?

If I plot the chart normally pontos.x = c(7.522936, 12.228712, 17.316037, 22.148996, 27.236321, 32.196464, 37.283789, 42.116748, 47.076890, 52.164215, 57.378723, 62.211682, 67.426190) pontos.y = c(0.001583012, 0.001583012, 0.013938224, 0.017...
asked by 17.07.2017 / 01:22