splitstackshape

Displaying data in the chart based on plotly_click in R shiny

≡放荡痞女 提交于 2019-11-27 08:52:42
问题 Please run this script below, the following R script gives a shiny dashboard with two boxes. I want to reduce the width between two boxes and display data in the right chart. The data should be based on the on click event that we see in the ggplotly function. Also plotly can be used to do the job, I guess. I want the code to fast and efficient at the same time. ## app.R ## library(shiny) library(shinydashboard) library(bupaR) library(eventdataR) library(lubridate) library(dplyr) library(XML)

Splitting text to words with R and cSplit()

拜拜、爱过 提交于 2019-11-27 08:08:07
问题 I'm trying to split a series of sentences into separate words, that is to tokenize the text. I have found an R package splitstackshape that is able to do what I want, well almost... it truncates the output to the first and last 5 rows. Anyway, this is what I need to do: id text 1 Lorem ipsum dolor sit amet 2 consectetur adipiscing elit 3 Donec euismod enim quis 4 nunc fringilla sodales 5 Etiam tempor ligula vitae 6 pellentesque dictum 7 Quisque non justo scelerisque 8 est facilisis congue