I am trying to make my first htmlWidget. I followed the below steps and created my widget:
library(htmlwidgets)
library(devtools)
setwd("C:/R/Package")
devtools::create("myPackage")
setwd("C:/R/Package/myPackage")
htmlwidgets::scaffoldWidget("myPackage")
When I install the package and try to execute the myPackage("Hello World") function I get the error "Can not find function "myPackage" " It will only execute when I use myPackage:::myPackage("Hello World"). Why do I need to add the :::namespace tag?
devtools::install()
library(myPackage)
myPackage("Hello World")