Posts by r_rabbit • 517 points
16 posts
-
2
votes1
answer45
viewsQ: Transform a list (list) into a database (data.frame)
I have the list below. I would like to turn it into a data.frame (or Tibble): dados.lista <- list(id = 2287276L, uri = "https://dadosabertos.camara.leg.br/api/v2/proposicoes/2287276", siglaTipo =…
-
3
votes1
answer47
viewsQ: ggplot: geom_area - error with aes(Fill)
I have the following data and would like to create a chart with the ggplot2::geom_area() with different colors for the positive and negative values. However, I am getting an error and I am not being…
-
3
votes1
answer73
viewsQ: ggplot2: get color palette used in scale_color
Do you know if it is possible to get the color palette used in scale_color_*? I would like to get the specific colors (Hex color codes) used with the package paletteer in each case to then use it in…
-
2
votes1
answer79
viewsQ: Calculate percentage with dplyr::add_count
how it would be possible to calculate percentages with the dplyr::add_count()? To calculate with the dplyr::count() is very simple, as follows: library(tidyverse) dt <- Titanic dt %>%…
-
0
votes1
answer91
viewsQ: transform named list to dataframe
I’d like to turn a nominated list into a data.frame (or Tibble) where the name of the object in the list becomes an observation in the data.frame The example list I have is this: mylist <-…
-
4
votes1
answer77
viewsQ: Webscraping - Site with choices
I have a more general question (although this site is more suitable for more specific things), and I would appreciate it if someone could help with some tips on where to start. It is possible to…
-
4
votes1
answer49
viewsQ: ggridges: peak heights proportional to quantities
Would anyone know if it’s possible, using the ggridges, make the heights proportional to the quantities? Follow the example: The problem is that the summit height of the first element, A624, with a…
-
5
votes1
answer109
views -
3
votes1
answer42
viewsQ: Create new rows and columns for non-existent values
I have a date frame where the "years" column is not filled in all the data I need. I would need, for each observation, the 1988 to 2014 scale, filling with 0 (zero) the years whose values do not…
-
1
votes2
answers308
viewsQ: Replace numeric values of one vector with another value in a data frame
i would like to replace (replace) the values of a given index (vector) which find corresponding in a dataframe (tbl) by another value determined by me. I tried the following # Criando um index…
-
2
votes1
answer167
viewsQ: R - gtrends: ISO language code "en" or "en-BR" do not work?
. Guys, I’m using gtrends and would like to get the "related_topics" in English (preferably "en-BR"), but the "hl" argument of the gtrends function is not returning to English. Without the argument,…
-
4
votes3
answers4047
viewsQ: A: How to count and sum the amount of a certain "factor" in the observations (lines) of a data.frame?
Dear, would like to get the amount of "yes" (factor) on each line of a data.frame, as follows. Would anyone know what arguments I would have to use to do this with "mutate"? I tried several ways and…
-
1
votes1
answer301
viewsQ: A: Subtitles overlaid [ggplot2]
Hello, personal,I’m having a subtitle overlay problem in ggplot. The following error message appears. Scale for 'fill' is already present. Adding another scale for 'fill', which will replace the…
-
0
votes1
answer1927
viewsQ: A: How to turn date only year (four digits) into a data frame?
I have a date frame with the column below. I would like to turn the years (with 4 digits) into dates (as.Date). The idea would be to keep only the years even. I tried some solutions I’ve seen…
-
0
votes1
answer3776
viewsQ: Excel: How to make a time series using dynamic table and graph with accumulation of values in the row?
I would like to make a time-series graph showing the accumulated values over time. Therefore, it would not be a zig-zag line, it would be a line denoting an evolution, as values are accumulated. To…
-
5
votes1
answer1755
viewsQ: How to import multiple excel tabs at the same time?
I am trying to reproduce the code below, but without success. What should I put in the argument path? Is it the same in all of them? Any clearer examples so I can understand? Any tips on how to…