如何在HTML文件中包含php表

时间:2019-02-26 18:59:31

标签: javascript php html html5

我已经用php代码解码了一个json,因此使用我的代码,我将拥有一个php数组。 如何在我的主要html文件中包含此数组?

这是我的php代码:

library(tidyverse)

models1 <- mtcars %>% split(.$cyl) %>% 
  map(function(df) lm(mpg ~ wt, data=df))

models1 %>% 
  map(summary) %>% 
  map_dbl(~.$r.squared)
#>         4         6         8 
#> 0.5086326 0.4645102 0.4229655

models2 <- mtcars %>% split(.$cyl) %>% 
  map(~lm(mpg ~ wt, data=.))

models2 %>% 
  map(summary) %>% 
  map_dbl(~.$r.squared)
#>         4         6         8 
#> 0.5086326 0.4645102 0.4229655

0 个答案:

没有答案