tbrown122387 / gradeR

helps grade R script assignment submissions!
Other
4 stars 3 forks source link

Problems with e1071::svm #18

Closed davbachman closed 3 years ago

davbachman commented 3 years ago

When I use the svm function from the e1071 package, I get a Gradescope error that says could not find function "isFALSE" . Any ideas how to fix this?

tbrown122387 commented 3 years ago

Hmm, not sure. Attaching e1071 with library(e1071) doesn't mask the name isFALSE because there's no function in that library called isFALSE. Are you attaching any other packages? Any other information you can give me? Maybe replacing isFALSE with base::isFALSE will fix it.

davbachman commented 3 years ago

I don't have an isFALSE command anywhere, but I am using two other packages: modelr and tidyverse. I've created the simplest possible code to replicate the issue:

## ------------------------------------------------------------------------ library(tidyverse) library(modelr) library(e1071) test_mod<-svm(Species~.,data=iris) x<-2

The test file for this has a single test_that command, to check if x=2. Gradescope gives me the same error: Error in isFALSE(center) : could not find function "isFALSE" In addition: Warning message: running command 'timedatectl' had status 1 [1] "error: isFALSE" "error: center"

tbrown122387 commented 3 years ago

@davbachman can you attach the test file too? Now I suspect that Gradescope's servers have different version of R than your machine does. Maybe just throw in a definition at the top of your test file?

isFALSE <- function(x) {
  is.logical(x) && length(x) == 1L && !is.na(x) && !x
}
tbrown122387 commented 3 years ago

Closing because this was probably fixed by #10

davbachman commented 7 months ago

Hi Taylor,

Sorry to bother you. I taught with R/Gradescope for several years, but haven’t in a while. I now have a colleague using all my old assignments and autograders. They worked great for him last year but now they stopped.

One line of the setup.sh code that he was using was this: Rscript -e "install.packages('devtools'); devtools::install_github('tbrown122387/gradeR’)"

That came from an old exchange with you when I was having some trouble implementing something. I don’t know if this line of code is what is now causing issues, but my colleague is getting an error from Gradescope that says “library gradeR not found”.

I had him change the above setup.sh code to this instead: Rscript -e "install.packages('gradeR')"

And the error changed to:

“Error: library(tidy verse)” NULL

Any ideas?

Thanks, Dave

tbrown122387 commented 7 months ago

Hey Dave,

Feel free to send me the whole zip file (either here or via email) he uploads to Gradescope. My guess is he forgot to add a line that installs tidyverse. That doesn't come with gradeR. Every third party library will need to be installed on teh gradescope machine, and that gets done in the setup.sh file.

So add another line like Rscript -e "install.packages('tidyverse')"

Also, check that space between tidy and verse

davbachman commented 7 months ago

Hi Taylor,

Thanks for your help! There is a line in the setup file that says: Rscript -e "install.packages('tidyverse')"

Full zip archive is attached.

Thanks again, Dave

On Jan 29, 2024, at 12:54 PM, Taylor R. Brown @.***> wrote:

Hey Dave,

Feel free to send me the whole zip file he uploads to Gradescope. My guess is he forgot to add a line that installs tidyverse. That doesn't come with gradeR. Every third party library will need to be installed on teh gradescope machine, and that gets done in the setup.sh file.

— Reply to this email directly, view it on GitHubhttps://github.com/tbrown122387/gradeR/issues/18#issuecomment-1915547906, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGGJ4NOEIJX6N673M44PFO3YRAEBTAVCNFSM43CEDYR2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJRGU2TINZZGA3A. You are receiving this because you were mentioned.Message ID: @.***>

tbrown122387 commented 7 months ago

I don't see a zip file

davbachman commented 7 months ago

Weird! There’s no attachment called “Archive.zip”? Attaching it again here.

Dave

On Jan 30, 2024, at 10:51 AM, Taylor R. Brown @.***> wrote:

I don't see a zip file

— Reply to this email directly, view it on GitHubhttps://github.com/tbrown122387/gradeR/issues/18#issuecomment-1917684168, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGGJ4NJ3QQBBEVDXAJSVLITYRE6LLAVCNFSM43CEDYR2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJRG43DQNBRGY4A. You are receiving this because you were mentioned.Message ID: @.***>

tbrown122387 commented 7 months ago

I don't tink Github forwads email attachments to issue attachments. Same issue.

davbachman commented 7 months ago

Is there another email address I can use then?

On Jan 30, 2024, at 11:04 AM, Taylor R. Brown @.***> wrote:

I don't tink Github forwads email attachments to issue attachments. Same issue.

— Reply to this email directly, view it on GitHubhttps://github.com/tbrown122387/gradeR/issues/18#issuecomment-1917704851, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGGJ4NOHR3OWYGWOWIHB7RTYRE74NAVCNFSM43CEDYR2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJRG43TANBYGUYQ. You are receiving this because you were mentioned.Message ID: @.***>

davbachman commented 7 months ago

Is it better to report this as an issue on GitHub? Maybe I can attach the zip file there.

Thanks, Dave

On Jan 30, 2024, at 11:04 AM, Taylor R. Brown @.***> wrote:

I don't tink Github forwads email attachments to issue attachments. Same issue.

— Reply to this email directly, view it on GitHubhttps://github.com/tbrown122387/gradeR/issues/18#issuecomment-1917704851, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGGJ4NOHR3OWYGWOWIHB7RTYRE74NAVCNFSM43CEDYR2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJRG43TANBYGUYQ. You are receiving this because you were mentioned.Message ID: @.***>

tbrown122387 commented 7 months ago

Could you open another issue on your computer? There's a button there to add/attach files.

The reason it should be in a new issue is because this question is coinciding with some difficulties my class is having, and I think I know what the problem is.

davbachman commented 7 months ago

OK, just created an issue and (hopefully) attached a zip file there. Thanks again for your help!

Dave

On Jan 30, 2024, at 11:31 AM, Taylor R. Brown @.***> wrote:

Could you open another issue on your computer? There's a button there to add/attach files.

The reason it should be in a new issue is because this question is coinciding with some difficulties my class is having, and I think I know what the problem is.

— Reply to this email directly, view it on GitHubhttps://github.com/tbrown122387/gradeR/issues/18#issuecomment-1917745284, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGGJ4NKE5J2TDYP42HNSPTLYRFDCHAVCNFSM43CEDYR2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJRG43TINJSHA2A. You are receiving this because you were mentioned.Message ID: @.***>