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

Limits on nrow and ncol when printing to screen #756

Closed
thomasd2 opened this issue May 25, 2017 · 3 comments
Closed

Limits on nrow and ncol when printing to screen #756

thomasd2 opened this issue May 25, 2017 · 3 comments
Assignees

Comments

@thomasd2
Copy link

It seems like matrices with more than 20 rows or columns are not printed when typing the name of the object. Is there a reason why - the limit seems low, I often want to look for instance at a matrix with 50 rows and 5 columns. I can use View() but that requires more typing. Thanks!

@kbenoit
Copy link
Collaborator

kbenoit commented May 25, 2017

See ?print.dfm. That involves even more typing I am afraid! If you have suggestions on how this would be better set, we'd be happy to hear it. Could add to global quanteda options, for instance.

@kbenoit kbenoit closed this as completed May 25, 2017
@thomasd2
Copy link
Author

Thanks. Some solution allowing to set this according to personal tastes when loading the package or even permanently (through specification in Rprofile??) would be great.

@kbenoit
Copy link
Collaborator

kbenoit commented May 28, 2017

How about

quanteda_print_dfm_ndoc
quanteda_print_dfm_nfeature

as global options?

So the new signature for print.dfm() would be:

setMethod("print", signature(x = "dfm"), 
          function(x, show.values = FALSE, show.settings = FALSE, show.summary = TRUE, 
                   ndoc = getOption("quanteda_print_dfm_ndoc"), 
                   nfeature = getOption("quanteda_print_dfm_nfeature"), ...) {
...

and we would set these options in zzz.R.

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

No branches or pull requests

3 participants