nachocab / clickme

An R package to create interactive plots
257 stars 44 forks source link

confusing to run installed vega examples #21

Closed timelyportfolio closed 11 years ago

timelyportfolio commented 11 years ago

I think it is confusing for new users to know how to run the installed vega examples. Would it be best to go in the wiki or somehow in the documentation? For instance on the lifelines example, the process would go something like:

#if not already installed, uncomment the two lines below
#library(devtools)
#install_github("clickme", "nachocab")

require(clickme)
#set location where you put your multiline ractive
ractivepath = get_root_path()
#if we want to change then comment line above and uncomment next two
#ractivepath = "path to your ractive/"
#set_root_path(ractivepath)

#load the csv data from the example
data = read.csv(paste0(ractivepath,"/vega/data/lifelines_people.csv"),stringsAsFactors=FALSE)

eventdata = read.csv(paste0(ractivepath,"/vega/data/lifelines_events.csv"),stringsAsFactors=FALSE)

#run clickme to create
clickme_vega(spec="lifelines", data=data, params=list(width=400,height=100,event_data=eventdata))
nachocab commented 11 years ago

Would you say the new README is clear enough? If so, we can close the issue.

timelyportfolio commented 11 years ago

yes, very nicely done. saw the list_ractives() function while exploring the code. glad you added a ref to that also.