Help to error Error in `stop_subscript()`:

Hi everyone,
Sorry for my english and for not very good technical terminology.
I need help please about a simple thinks but not for me.
I make a graphics whit r studio one time, but when I try to reprodue second time dont' work.
This is the scripts :slight_smile:
setwd("‪C:\Users\Desktop")
dir()
library(readxl)
read_excel("Dati_Finali.xlsx")
getwd
getwd()
read_excel("Dati_Finali.xlsx")
setwd("C:/Users/toniv/Desktop/Virzi")
getwd()
read_excel("Dati_Finali.xlsx")
Fin = read_excel("Dati_Finali.xlsx", sheet = "Dati")
Fin
Y = Fin["D_VIS"]
View(Y)
Y
Y_star=Y[which(Y>0)]
h <- hist(Y, breaks = 10, density = 10,
col = "lightgray", xlab = "Accuracy", main = "Overall")
xfit <- seq(min(Y), max(Y), length = 40)
yfit <- dnorm(xfit, mean = mean(Y), sd = sd(Y))
yfit <- yfit * diff(h$mids[1:2]) * length(Y)
lines(xfit, yfit, col = "black", lwd = 2)

If someone can help me I will be very grateful.

Which line has the error?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.