R: How to disable truncation of a list of package functions?

How can I list all the results that occurred when entering packageName<tab> , i.e. the complete list offered through autocomplete? In R 2.15.0, I get the following for Matrix::<tab> :

 > library(Matrix) > Matrix:: Matrix::.__C__abIndex Matrix::.__C__atomicVector Matrix::.__C__BunchKaufman Matrix::.__C__CHMfactor Matrix::.__C__CHMsimpl Matrix::.__C__CHMsuper Matrix::.__C__Cholesky Matrix::.__C__CholeskyFactorization Matrix::.__C__compMatrix Matrix::.__C__corMatrix Matrix::.__C__CsparseMatrix Matrix::.__C__dCHMsimpl Matrix::.__C__dCHMsuper Matrix::.__C__ddenseMatrix Matrix::.__C__ddiMatrix Matrix::.__C__denseLU Matrix::.__C__denseMatrix Matrix::.__C__dgCMatrix Matrix::.__C__dgeMatrix Matrix::.__C__dgRMatrix Matrix::.__C__dgTMatrix Matrix::.__C__diagonalMatrix Matrix::.__C__dMatrix Matrix::.__C__dpoMatrix Matrix::.__C__dppMatrix Matrix::.__C__dsCMatrix Matrix::.__C__dsparseMatrix Matrix::.__C__dsparseVector Matrix::.__C__dspMatrix Matrix::.__C__dsRMatrix Matrix::.__C__dsTMatrix Matrix::.__C__dsyMatrix Matrix::.__C__dtCMatrix Matrix::.__C__dtpMatrix Matrix::.__C__dtrMatrix Matrix::.__C__dtRMatrix Matrix::.__C__dtTMatrix Matrix::.__C__generalMatrix Matrix::.__C__iMatrix Matrix::.__C__index Matrix::.__C__isparseVector Matrix::.__C__ldenseMatrix Matrix::.__C__ldiMatrix Matrix::.__C__lgCMatrix Matrix::.__C__lgeMatrix Matrix::.__C__lgRMatrix Matrix::.__C__lgTMatrix Matrix::.__C__lMatrix Matrix::.__C__lsCMatrix Matrix::.__C__lsparseMatrix [...truncated] 

This post [...truncated] annoying and I want to create a complete list. What option / flag / knob / configuration / spell do I need to call to avoid truncation? I got the impression that I saw a complete list, but not more - maybe it was on another OS (for example, Linux).

I know that ls("package:Matrix") is one useful approach, but it's not the same as setting a parameter, and the list is different.

+7
source share
1 answer

Unfortunately, on Windows, it looks like this behavior is tightly related to the C code used to create the console. So the answer seems to be โ€œno, you can't turn it offโ€ (at least without changing the sources and then recompiling R from scratch).

Here are the relevant lines from $RHOME/src/gnuwin32/console.c :

 909 static void performCompletion(control c) 910 { 911 ConsoleData p = getdata(c); 912 int i, alen, alen2, max_show = 10, cursor_position = p->c - prompt_wid; ... ... 1001 if (alen > max_show) 1002 consolewrites(c, "\n[...truncated]\n"); 

You are correct that on some other platforms all results are printed. (For example, I often use Emacs, and it displays all the results of filling the tab in a separate buffer).

As an interesting note, rcompgen , the backend that actually completes the tab rcompgen (unlike the print results on the console), always finds all the improvements. Windows just doesn't print them for us.

You can verify that this happens even on Windows by typing:

 library(Matrix) Matrix:: ## Then type <TAB> <TAB> ## Then type <RET> rc.status() ## Careful not to use tab-completion to complete rc.status ! matches <- rc.status()$comps length(matches) # -> 288 matches # -> lots of symbols starting with 'Matrix::' 

For more information about the backend and the functions and parameters that control its behavior, see ?rcompgen .

+9
source

All Articles