plot - RStudio creates the graph, but Markdown will not -
i'm running short snippet of code , can create graph in rstudio plot window, when run markdown, following error:
error in hist(p.rating): object 'p.rating' not found
here code i'm using:
{r loading data, include=false} setwd("~/google drive/new leaders/data/knowngroups") mydata <- read.csv("copy of gates study data download (052815_v2).csv") attach(mydata) colnames(mydata)[5] <- "p.rating" {r fig.width=7, fig.height=6} hist(p.rating)
thanks!
the histogram statement @ end has column name without data set. should help:
hist(mydata$p.rating)
Comments
Post a Comment