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

Problem when using "PCA FLAVOUR: Symbols" under "Output" in the GUI #52

Open
MatthiasSL opened this issue Jun 16, 2022 · 9 comments
Open

Comments

@MatthiasSL
Copy link

I am using stylo to do PCA on a corpus, and when I use the "Classic", "Loadings" and "Technical" PCA flavours, stylo generates a plot just fine, but when I try to generate one using the "Symbols" flavour, I get the following error (the first two words are just Danish for "error in"):

Fejl i fun(key = base::quote(list(columns = 2, text = list(NULL), points = list( : first component of text must be vector of labels

I am analyzing a corpus consisting of english-language files with a few special characters here and there, but all unicode-based. Considering the fact that the other flavours works just fine, I'm assuming its not an issue with the corpus. When I first got the error, I noticed I was on a lower version of R (4.1.2) than the latest version of stylo was made for (4.1.3), so I updated to the newest version of R (4.2.0), but the error persists.

It appears a similar error has happened before (although that user was running everything via the command line): #43

@jmclawson
Copy link
Contributor

What version of stylo are you using? I think it’s been updated in the latest versions.

@tillgrallert
Copy link

@jmclawson the error is very much present in the current version of stylo (0.7.4) as available from CRAN. on macOS 10.14.5, R 4.0.5, I get:

 Error in fun(key = base::quote(list(columns = 2, text = list(NULL), points = list( : 
  first component of text must be vector of labels 

@jmclawson
Copy link
Contributor

You're right! I see it, too. It's a variation of a problem that was fixed in a previous update--but it turns out not to have been fixed completely. A fix is on the way.

(Details: The data.frame() command in previous versions of R defaulted to stringsAsFactors = TRUE, but this changed sometime in ~2020 to stringsAsFactors = FALSE. This bug showcases one of the moments where stylo hasn't yet corrected for it.)

@jmclawson
Copy link
Contributor

jmclawson commented Aug 1, 2022

On second thought... It seems my debugging time this evening was spent tracking down the exact same error I fixed in 2020. 🙃

I hope CRAN can be updated with the fix, too. In the meantime, the GitHub version can be installed directly with the remotes package: remotes::install_github("computationalstylistics/stylo").

@tillgrallert
Copy link

@jmclawson thank you very much for the quick response and fix. Exceptional!

@tillgrallert
Copy link

Another question though: I don't see any new commits to any of the branches in this repository.

@jmclawson
Copy link
Contributor

The bug was fixed in my August 2020 pull request:set stringsAsFactors=TRUE for COOR data.frame.

The GitHub version has had the fix incorporated since the request was merged in December 2021, but the CRAN version is older.

@tillgrallert
Copy link

Thank you very much for this clarification. I am sorry it didn't occur to me to check difference between CRAN and Github repo.

@computationalstylistics
Copy link
Owner

Dear Both, thanks a lot for a very fruitful discussion. I have indeed merged @jmclawson 's improvements some time ago, then I accidentally messed with the branches, and then pushed the stuff to CRAN without the improvements :-( As far as I can see, it works fine in the current state. I'll finalize the ver. 0.7.5 in the upcoming days, and push it again to CRAN.

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

4 participants