Hello, I posted this at https://github.com/jamovi/scatr/issues/2 about a week ago.
I wanted to use scatr in R to get a scatterplot, but I get errors
Here is the code with # errors
data <- data.frame(Age = runif(100, 25, 90))
a <- 0
b <- sample(c(-1, 1), 1) * sample(c(0.2, 0.4, 0.6), 1)
data$Score <- a + b * data$Age + rnorm(100, sd = 15)
#from syntax mode in jamovi
scatr::scat(
data = data,
x = Age,
y = Score)
#Error in initialize(...) : object 'Age' not found
# so specified variables with $
scatr::scat(
data = data,
x = data$Age,
y = data$Score)
#Error in .subset2(x, i, exact = exact) : subscript out of bounds
############################
It works fine in Rj Editor in jamovi but not in R.
Appreciate your help
Best, Peter
scatr
Re: scatr
Hey Peter,
you have a clean installation from
are jmvcore and jmvconnect also installed?
I have another experience with your data (WIN10 PRO, R 4.1.3, R 4.2.2). Best, Maurizio
you have a clean installation from
Code: Select all
install_github("raviselker/scatr")
I have another experience with your data (WIN10 PRO, R 4.1.3, R 4.2.2). Best, Maurizio