Importing excel and graphing

Dason

Ambassador to the humans
#22
Does this work for anything? Like anything I can put a '?' in front of?
Well - anything that has an examples section in the documentation. And as long as the examples aren't surrounded in \dontrun tags. But yes - it's a nice way to see some examples of functions being used without having to copy/paste everything directly.
 

noetsi

Fortran must die
#23
I copied and pasted this from a link - since I am brand new to plotting. I will try to find the link and paste it here. I told 3 people who expressed an interest in learning R this webpage. They are learning from me which (beyond brining laughter here) is less than ideal. :)
 

noetsi

Fortran must die
#24
I am having trouble with data labels in bar charts.

This should work, but does not center correctly perhaps because of the type of bar chart I am using.

Code:
library(gcookbook)
                  library(ggplot2)
ggplot(cabbage_exp,aes(x=Date,y=Weight,fill=Cultivar))+ geom_col(position=position_dodge(.7),width =.5)+geom_text(aes(label=Weight),vjust=-.02)
 

noetsi

Fortran must die
#25
I don't understand why this does not work (I get a blank chart with a Y and x axis).

Code:
 library(gcookbook)
 library(ggplot2)
library(dplyr)
library(tidyverse)
climate_mod<- climate %>%  filter (Source=="Berkley")%>%  select(Year,Anomaly10y,Unc10y)
 ggplot(climate_mod, aes(x=Year,y=Anomaly10y))+ geom_ribbon (aes (ymin=Anomaly10y-Unc10y,ymax=Anomaly10y + Unc10y),alpha=.2)+geom_line()
 
#26
I don't understand why this does not work (I get a blank chart with a Y and x axis).

Code:
climate_mod<- climate %>%  filter (Source=="Berkley")%>%  select(Year,Anomaly10y,Unc10y)
I get a dataset with 0 observations when I run the above code. "Berkley" is misspelled.

Code:
climate_mod<- climate %>%
  filter(Source=="Berkeley") %>%
  select(Year,Anomaly10y,Unc10y)
ggplot(climate_mod, aes(x=Year,y=Anomaly10y))+ geom_ribbon (aes (ymin=Anomaly10y-Unc10y,ymax=Anomaly10y + Unc10y),alpha=.2)+geom_line()
 

noetsi

Fortran must die
#27
I thought I copied and pasted it from the book I was working from but apparently not. I am surprised I don't get an error.

One of the hardest things for me in R as compared to SAS. Spelling matters so much.