All Questions
170
questions
0
votes
0
answers
37
views
Rearranging dataset for graphing two y variables in R [duplicate]
I am trying to rearrange a dataset to create a line graph with two y-variables that will use the same scale, meaning that there will only be one y-axis. One of my variables has significantly higher ...
0
votes
2
answers
72
views
Treating Date and Time for a River Discharge Graph
I downloaded discharge data for a river from a government website, they had formatted the date and time data as so please see format.
This is my code
library(ggplot2)
ggplot(CHEM_RESULTS, aes(x= `...
1
vote
1
answer
34
views
Secondary y axis R ggplot2
I need a graph with a secondary y axis like this, but I'm having some issues:
I have tried a lot of changes in my code, but it seems like the axis scales are not working, and now this is what I got:
...
0
votes
1
answer
19
views
Stacked line graph while preserving the visualization of each (separate) line graph
I have the following data.table:
> df
# A tibble: 18 × 3
std near off
<dbl> <dbl> <dbl>
1 0.3 0.849 0.904
2 0.4 0.850 0.916
3 0.5 0.859 0.924
4 0.6 0.872 0....
0
votes
1
answer
54
views
How can I insert a line graph (ylim = 27. 30) into another diagram with 2 line graphs (ylim=0,120) without distortion?
I need to visualize data of different character (temperature, light intensity, rel. humidity) for a kind of climate diagram. My problem, I believe, lies within the different ylims, which prevent an ...
0
votes
0
answers
20
views
Timeseries graph with dual Y axis with different scales
I have stumbled upon an error in my code that reads as follows: 'Error in scale_y_axis1(labels = scales::comma): could not find function "scale_y_axis1"'. Can you please help me figure out ...
1
vote
0
answers
88
views
Adding significance values between groups on line plot in R (ggplot)
I've created a line plot that displays weight data over time in a diet study. I am trying to add significance values between each group at the end of the time period. My data is similar to the ...
0
votes
0
answers
48
views
How can I fix my x-axis to show all the years that is within my dataset on my graph as well as take away the .0 .5 at the end of each year label?
I'm having issues on being able to show all the years on my graph that are represented in my dataset such as 2008,2009,2010,2011,2013,2014,2015,2016,and 2017.
It is only using the years 2010 2012 2015 ...
0
votes
1
answer
85
views
Creating a line graph for multiple variables
I am just wondering if someone can help.
I am working in R markdown and got the following set of data and same set every year for 5 years in the form of other sets of columns besides this set. ...
0
votes
0
answers
23
views
Fit two line graphs with different values in the same chart
I have one set of data called Earnings which span from 0-80000, and one called NBPrice which span from 0-200, and would like to fit both in the same chart, but the first range is too high, any way to ...
-1
votes
1
answer
81
views
A line graph instead of histogram
hi there I hope you all doing great
I have created this graph as a boxplot
My boxplot graph
by this code:
library(tidyr)
library(ggplot2)
library(dplyr)
library(tidyverse)
library(skimr)
library(...
0
votes
2
answers
47
views
Plot line graph or geom-line based on three columns and groupby
I want to plot the percentage of people by socio-economic status by AgeGroup. Below is the example of dataframe.
S.NO
SocioEcnomicStatus
Age
AgeGroup
P1
2
43
36-45 AgeGroup
P2
5
27
26-35 AgeGroup
...
0
votes
1
answer
49
views
R drawing 2 lines with confidence interval on the same graph
I am trying to draw two lines on the same graph with odds ratio and confidence interval. X axis is age group and y axis is odds ratio. There are two groups: cases and control
This is what I tried so ...
-1
votes
2
answers
169
views
Converting days to months of the year
I have a data frame with one of the columns given as time. The time column is as a result of simulations from ODE system of equations. I want to convert the time column to months of the year.
df <- ...
0
votes
1
answer
161
views
What is the best way to create a line graph in R ggplot2 for a dataframe containing 2 replicates per sample
I have been playing around for ages trying to figure out the best way to manipulate a small dataframe into a format that can be used in ggplot to create a data frame based on the average of each ...