I have following code and it doesnt work
df <- data.frame (
Bikes = c("Canyon", "Santa", "Radon"),
Tretlage = c(1,1,3),
Kurbel = c(2,3,4),
Winkel = c(4,5,3)
)
plot_ly(
type = 'scatterpolar',
mode = "closest",
fill = 'toself'
) %>%
add_trace(
r = df[1,],
theta = c("Tretlage", "Kurbel","Winkel"),
showlegend = TRUE,
mode = "markers",
name = df[1,1]
)
and instead of typing in r every number like
r = c(1,2,4)
i want to put in like "df" and it takes the values automatically, but somehow that doesnt happen. Does someone know why?
it should look like this:if r = c(1,2,4)
question from:
https://stackoverflow.com/questions/65874787/how-do-i-get-the-row-values-instead-of-the-row-names 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…