我想分享我用图绘制的图
“我尝试了Sys.setenv(“ plotly_domain” =“ https://plot.ly/~tariq566.com”),然后创建了图表链接chart_link = api_create(pN,filename =“ rf”)“ < / p>
df4 <- data.frame(Group=rep(c("No pre op CKD", "Stage 1-4", "ESRD"), each=9),
Year=rep(c("2006","2007","2008","2009","2010","2011","2012","2013","2014"),3),
len=c(7.79 ,4.41,3.87,4.45,3.87,4.75,3.93,3.17,3.86,
4.35 ,2.97,4.85,4.28,4.48,4.69,3.88,2.66,3.25,
13.33,14.29,9.38,12.22,7.29,7.25,10.08,11.72,16.67))
df4$Group<-factor(df4$Group, levels=c("No pre op CKD", "Stage 1-4", "ESRD"))
pN <- df4 %>%
plot_ly(
x = ~Group,
y = ~len,
size = ~len,
color = ~Group,
frame = ~Year,
text = ~Group,
hoverinfo = "text",
type = 'bar',
yaxis = list(title = 'Mortality (%)')
) %>%
layout(
xaxis = list(
title = "Groups"),
yaxis = list(title = 'Mortality (%)',barmode = 'Group')
)
Sys.setenv("plotly_domain"="https://plot.ly/"username.com")
chart_link= api_create(pN,filename="rf")
##Error: lexical error: invalid char in json text.
<!DOCTYPE html> <html class="ba
(right here) ------^