r-plotly

Quadratic regression line using R plotly

感情迁移 提交于 2020-12-11 08:52:15
问题 I am quite new to R and really new in plotly . I am trying to plot a quadratic (i.e. 2nd-degree polynomial) regression line. Once some prices vs years, and once the same prices vs a list of certain integer numbers (which can be the same), let's say scores. The data in this example are price = c(995, 675, 690, 600, 612, 700, 589, 532, 448, 512, 537, 560) score = c(89, 91, 88, 89, 91, 91, 89, 93, 83, 91, 91, 90) year = c(2005:2016) The first fit works well by coding enter code here qfit1 <- lm

Quadratic regression line using R plotly

两盒软妹~` 提交于 2020-12-11 08:46:34
问题 I am quite new to R and really new in plotly . I am trying to plot a quadratic (i.e. 2nd-degree polynomial) regression line. Once some prices vs years, and once the same prices vs a list of certain integer numbers (which can be the same), let's say scores. The data in this example are price = c(995, 675, 690, 600, 612, 700, 589, 532, 448, 512, 537, 560) score = c(89, 91, 88, 89, 91, 91, 89, 93, 83, 91, 91, 90) year = c(2005:2016) The first fit works well by coding enter code here qfit1 <- lm

spurious warning when mapping marker size in plotly R

自作多情 提交于 2020-12-09 08:39:36
问题 The simple scatterplot has a third variable mapped to the marker/point size. The plot looks perfect to me, but it throws a warning about multiple values. Each x & y value has exactly one size value. Other than suppressing the warning, can a respecify this graph so it does not throw the warning? Warning message: `line.width` does not currently support multiple values. Code: plotly::plot_ly( data = iris, x = ~Sepal.Length, y = ~Petal.Length, size = ~Sepal.Width, type = 'scatter', mode =

spurious warning when mapping marker size in plotly R

南楼画角 提交于 2020-12-09 08:39:02
问题 The simple scatterplot has a third variable mapped to the marker/point size. The plot looks perfect to me, but it throws a warning about multiple values. Each x & y value has exactly one size value. Other than suppressing the warning, can a respecify this graph so it does not throw the warning? Warning message: `line.width` does not currently support multiple values. Code: plotly::plot_ly( data = iris, x = ~Sepal.Length, y = ~Petal.Length, size = ~Sepal.Width, type = 'scatter', mode =

spurious warning when mapping marker size in plotly R

旧街凉风 提交于 2020-12-09 08:39:02
问题 The simple scatterplot has a third variable mapped to the marker/point size. The plot looks perfect to me, but it throws a warning about multiple values. Each x & y value has exactly one size value. Other than suppressing the warning, can a respecify this graph so it does not throw the warning? Warning message: `line.width` does not currently support multiple values. Code: plotly::plot_ly( data = iris, x = ~Sepal.Length, y = ~Petal.Length, size = ~Sepal.Width, type = 'scatter', mode =