Skip to main content

All Questions

Tagged with
1 vote
0 answers
109 views

Error "geom_line(): Each group consists of only one observation. ℹ Do you need to adjust the group aesthetic?" (line graph - repeated measures design)

I am trying to plot a line graph for two independent variables. Here are where I downloaded the data and how I converted them to a long format: textMessages <- read.delim("http://www....
OzkanGelincik's user avatar
0 votes
1 answer
31 views

adding standard errors to correct panels on faceted bar chart

I have this dataframe: structure(list(taxon = c("Acidaminococcus", "Butyricicoccus", "Butyrivibrio", "Collinsella", "Coprococcus", "Olsenella&...
WindSur's user avatar
  • 140
0 votes
1 answer
35 views

Creating long data frame with count of several variables

I have the following data frame (dput provided): structure(list(Poor_health = c(2, 1, 3, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 1, 4, 1, 1, 3, 2, 4, 2, 3, 3, 3, 3, 4, 2, 2, 1,...
bricevk's user avatar
  • 207
0 votes
0 answers
134 views

Transforming data with NAs in ggaluvial format and visualizing as a alluvial plot in R

I tried multiple options with Python, but did not resolve it. Found ggaluvial package and need some help. This is my fake data in such format. I calculated the frequency of each unique combination, ...
Anakin Skywalker's user avatar
0 votes
1 answer
176 views

Counting frequencies from categorical data by group where data frame is in wide format

I have a patient dataset. Two groups of patients with several categorical variables include gender, medication and medication conditions (comorbidities). The example below is a fictitious dataset to ...
Jack's user avatar
  • 31
1 vote
1 answer
63 views

Lineplot by group over time

I am trying to build a line plot showing the change of a certain variable over time by group. My data has values from a single person stored in each row and I am struggling to plot the mean and ...
DYtto's user avatar
  • 11
0 votes
1 answer
28 views

reshaping dataframe before plotting the evolution of variables

I would like to plot the evolution of a lot of economic aggregates from a dataframe (if possible, by faceting to have one plot per variable). First, I need to rearrange my dataframe, changing rows ...
gerardlambert's user avatar
0 votes
2 answers
90 views

Melt a matrix for a barplot [duplicate]

I have a tibble with the following format: ID fragment1 value1 fragment2 value2 fragment3 value3 1 50 90 45 10 NA NA 2 50 ...
point618's user avatar
  • 1,395
1 vote
1 answer
190 views

How to draw barplot on either side of the y-axis using ggplot2?

I am trying to draw a barplot on either side of the y-axis (atleast present in "YES" or "NO") instead of stacking both "YES" and "NO" together. Firstly I ...
MOHAMMED TOUFIQ's user avatar
0 votes
2 answers
72 views

What's the best approach for visualizing aggregated survey data (not tidy)? [closed]

The current data frame I'm working with is structured such that likert scale response titles form the column names, and row names are the demographics associated with the question asked. The likert ...
ikeepwading's user avatar
2 votes
1 answer
153 views

Graph stack bar for multiple variables with wrong percentages

I am trying to get a graph stack bar for multiples variables to display percentages for each level in each variable, example: Category <- c(rep(c("A", "B", "C", "...
Rodrigo Badilla's user avatar
0 votes
2 answers
138 views

Reproducing this plot in R

I have two groups of patients. I want to have a plot for two groups of patients something like this plot I have such a data > dput(df) structure(list(gene = c("18q", "4q", &...
Mussa's user avatar
  • 117
0 votes
1 answer
129 views

Import vector in one CSV cell R

I have data of samples from a bunch of time series. I have a spreadsheet of start year of each, end year of each, and the years that measurements were taken between. I want to plot them as line ...
Jake L's user avatar
  • 1,037
1 vote
1 answer
74 views

R ggplot2 line two rows and all columns

I have this dataset: structure(list(AgeGroup = c("Old", "Young"), Point.1 = c(0.401899407258065, 0.432845035714286), Point.2 = c(0.435610404, 0.448826385964912 ), Point.3 = c(0....
CanyonView's user avatar
2 votes
1 answer
667 views

How do I output the correct percentages on each bar of my Likert chart?

I'm trying to get my code to output the percentage on top of each individual bar. Right now, the percentages shown below are on the wrong side. My code combines Labels 1 and 2 and Labels 3 and 4, and ...
user avatar

15 30 50 per page
1
2 3 4 5