Forum Replies Created
-
AuthorPosts
-
September 17, 2020 at 6:26 am EDT in reply to: Interactive visualizations: errors using XCharts and Polychart.js libraries #34847Romina HerreraParticipant
Hi Aashika,
Yeeeeees! It’s working!!
Thanks a lot for your help, I really appreciate it 🙂Have a nice week!
September 15, 2020 at 2:45 am EDT in reply to: Interactive visualizations: errors using XCharts and Polychart.js libraries #34819Romina HerreraParticipantHi Aashika.
The code is from the course “Interactive Visualizations”. Slides 44 and 45
It’s also necessary to run the code in slides 33 and 35 first to format the data set “ebola” into long format
Tried running rplot and xplot with other datasets, columns, etc, and keep getting the exact same errors, but at the same time no problem whatsoever with hplot, nplot… it’s driving me crazy.
Thanks,PS: this is my R version
> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)September 8, 2020 at 9:25 am EDT in reply to: Interactive visualizations: errors using XCharts and Polychart.js libraries #34772Romina HerreraParticipantHi Aashika,
Were you able to troubleshoot this?Thanks,
August 27, 2020 at 4:06 am EDT in reply to: Interactive visualizations: errors using XCharts and Polychart.js libraries #34282Romina HerreraParticipantHi Aashika, thanks for your quick response!
To your first question: class(ebola_long) # “data.frame”
The file used for xplot was provided with the materials of the visualization course, I´m copy-pasting the code below.
The rplot code uses mtcars (R Built-in Data Set)#### Slide 33: rCharts: visualizing health ####
# Load these packages first.
library(rCharts)
library(dplyr)
library(tidyr)
library(ggplot2)setwd(“”) ### <— Read in the data (data taken from https://github.com/cmrivers/ebola).
ebola <- read.delim(“./ebola.csv”, sep = “,”)
names(ebola) <- names(ebola) %>% gsub(“\\_”,” “,.) ### <—Rename the columns to get rid of underscores.
ebola_long <- ebola[, -1] %>% gather(Country, Count, -Day) ### <—-make the data into long format.
View(ebola_long)#### Slide 44: Additional JavaScript libraries ####
xPlot(Count ~ Day,
group = “Country”,
data = ebola_long,
type = “bar”)# Note: With that same data frame (ebola_long) I have no problem running the code in slide 37 (nplot).#
#### Slide 45: Additional JavaScript libraries ####
rPlot(mpg ~ wt,
data = mtcars,
type = “point”,
color = “gear”)I’m eager to receive your feedback!
Have a good day!August 26, 2020 at 8:54 am EDT in reply to: Interactive visualizations: errors using XCharts and Polychart.js libraries #34271Romina HerreraParticipantHi Aashika
Thanks for your answer, but as you can see in my session info, rcharts is installed: rCharts * 0.4.5 2020-08-18 [1] Github (ramnathv/rCharts@479a4f9).
Also, I should add that only had this problem with rplot and xplot, but hplot and nplot are running smoothly.The error I’m getting is “no applicable method for…”, if running the code without rcharts loaded I’ll be getting “Error: could not find function… ”
Hope this helps to clarify my issue
Thanks, -
AuthorPosts