Movatterモバイル変換


[0]ホーム

URL:


R-CMD-checkCRAN status

Vue.js is a quiet, very popularJavaScript framework with an impressive set of features, a solidcommunity, and MIT license. Don’t tell anybody, but I think I might evenlike it better than React. With all this, Vue deserves its own set ofhelpers forR, just liked3r andreactR.

vueR provides these helpers with its dependency functionhtml_dependency_vue() andhtmlwidget helpervue().

Installation

install.packages("vueR")

or for the latest if different from CRAN

remotes::install_github("vue-r/vueR")

Example

We’ll start with a recreation of the simple “Hello World” examplefrom the Vue.js documentation. This is the hard way.

library(htmltools)library(vueR)browsable(tagList(html_dependency_vue(),# local and minimized by default    tags$div(id="app","{{message}}"),    tags$script("    var app = new Vue({      el: '#app',      data: {        message: 'Hello Vue!'      }    });    "    )  ))

vueR gives us anhtmlwidget that can easethe code burden from above.

library(vueR)library(htmltools)# recreate Hello Vue! examplebrowsable(tagList(    tags$div(id="app","{{message}}"),vue(list(el ="#app",data =list(message ="Hello Vue!"        )      )    )  ))

Also, please check out additionalexamplesandexperiments.

Build/Update

vueR is now part of a Github organization, and hopefullywill be backed with interest by more than one (me) developer. For mostvueR users, this section will not apply, but I would liketo document the build/update step for new versions ofVue.Ingetvue.R,I created some functions for rapid download and deployment of newVue versions. Running all of the code ingetvue.R should update local minified and developmentversions of Vue and also update the version references invueR.

Code of Conduct

I would love for you to participate and help withvueR,but please note that this project is released with aContributorCode of Conduct. By participating in this project you agree to abideby its terms.


[8]ページ先頭

©2009-2025 Movatter.jp