我有一个关于的后续问题。假设我想为我的类+函数提供一个expo函数。在我的正常R会话中,以下内容工作得很好
'+.expo' <- function(a, b) a ^ b
r <- 2; class(r) <- "expo"
s <- 3; class(s) <- "expo"
r + s # gives 8
但是运行devtools::document()会给我Skipping invalid path: .expo.Rd消息。如果我正确理解,则'+.expo'是一个函数的无效名称,因为每个函数
我正在创建一个简单的折线图,它可以正确地呈现在Shiny中。
我现在已经添加了一个selectInput,其中包含两个不同度量的名称,它们在我的数据集中显示出来。我希望我的y变量相应地改变。
p <- plot_ly(data = LineChartData(), x= Calendar.Month, y = input$Measure, type = "line", group = Calendar.Year, col = Calendar.Year)
不幸的是,图表只呈现了一个点。它不会接受输入$Measure并在我的数据集中找到那个字段。
我知道在使用ggplot时
我使用以下代码在ggplot2中使用ggplot2()创建一个包含三个子图的绘图:
day <- c('5-Aug', '5-Aug','5-Aug','10-Aug','10-Aug','10-Aug','17-Aug','17-Aug','17-Aug')
station <- c(1:3,1:3,1:3)
Mean <- c(382, 1017, 1519, 698, 5398, 2458, 346, 5722, 6253)
S
我有一份随附的名单。
Site Name 5833 count ratio
1 Boston 0 days per week 1 0.01428571
2 Boston 1 day per week 6 0.08571429
3 Boston 2 days per week 11 0.15714286
4 Boston 3 days per week 5 0.07142857
5 Seattle 0 days per week 2 0.028