Posts by wesleysc352 • 113 points
10 posts
-
-1
votes1
answer51
viewsQ: How to round up a data.frame in R using the %> % dplyr operator?
I have a date.frame with many values with more than 2 houses after the comma, I would like to round to only 2 houses after the comma using preferably the operator %>%, if possible, as this…
rasked wesleysc352 113 -
0
votes1
answer30
viewsQ: How to arrange the order of the wrong captions using ggplot2 in R
I’m trying to generate a graph of 19-station IQA monitoring stations. But when I graph the order of the groups are wrong, because they are like this: 1, 10, 11 , 12, 13, 14, 15, 16, 17,18, 19, 2, 3,…
-
-1
votes1
answer34
viewsQ: how to determine the percentile that a given value has in a sample in R
Suppose I have a vector-shaped sample x <-c(2,3,68,253,1,35,3,35,01,24,04,36,254,2,28,12,4,54,66,775,6,45,33,68,71) I know if I make the command: quantile(x, 0.75) R returns me the percentile…
rasked wesleysc352 113 -
1
votes1
answer40
viewsQ: What is the difference between the bar graph and columns in R?
I would like to know the practical difference between the bar and column charts, because I see in ggplot for example that there are commands geom_bar and geom_col. What would be better or what the…
-
1
votes3
answers5381
viewsA: How to replace variables with NA values with ZERO within a date.frame in R?
for example df you can do so simply without the need to create a column by the mutate command: library(tidyverse) k <- c(1,2,80,NA,NA,51) j <- c(NA,NA,3,31,12,NA) df <-…
ranswered wesleysc352 113 -
0
votes1
answer39
viewsQ: how to delete a column of the "list" class in R
I have a data.frame in which I need to perform a correlation matrix. I’ve already sorted the numerical data by the command select_if(is.numeric) as suggested by the colleague at link. However, in my…
rasked wesleysc352 113 -
0
votes2
answers38
viewsQ: how to identify and delete columns with characters and factor in R
I have a data.frame with several columns with different data, integers, numbers, character and factor. I need to perform a correlation matrix with this data, but R can only perform the correlation…
rasked wesleysc352 113 -
0
votes1
answer62
viewsQ: Make a graph in R (ggplot) similar to Excel bar charts
How can I make a chart in R (ggplot) similar to this excel chart? I have a table in form csv with this data. I got up to the R this table, but now I don’t know how to make this graph using the R.…
-
3
votes1
answer89
viewsQ: change the distance between the bar and the Y axis in r
How can I change the distance of the bars relative to the y axis using ggplot? using the code: k <- c("a","b","c","d","e","f") j <- c(3,5,8,1,2,6) df <- data.frame(k,j) ggplot(df,…
-
1
votes1
answer90
viewsQ: how to create a frequency histogram with preset non-uniform intervals?
How can I make a histogram on Rstudio with the frequency on the y-axis and on the x-axis non-uniform predefined intervals, for example: 0-50, 50-150, 150-500, 500-2000. I have a hypothetical…