Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error using syntax code in R #2

Open
PeterC-alfaisal opened this issue Oct 27, 2022 · 0 comments
Open

error using syntax code in R #2

PeterC-alfaisal opened this issue Oct 27, 2022 · 0 comments

Comments

@PeterC-alfaisal
Copy link

Hello
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 specify 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant