SciViews - Miscellaneous Functions

Miscellaneous functions for SciViews or general use: manage a temporary environment attached to the search path for temporary variables you do not want to save() or load(), test if Aqua, Mac, Win, ... Show progress bar, etc.


= svMisc News

== Changes in svMisc 1.0-0

  • New, snake_case names of the functions. Old camelCase functions names are kept for compatibility, e.g., captureAll() -> capture_all().

  • All documentation converted to Roxygen2 format.

  • package() is reworked to record packages it cannot install, and the install() function uses these automatically.

== Changes in svMisc 0.9-73

  • New is_rstudio(), and is_rstudio_server() functions. Also, file_edit() detects if RStudio is used and get an internal buffer to edit a file by default in that case.

  • Vignette added.

== Changes in svMisc 0.9-72

  • toRjson() adapted to be compatible with R >= 3.5.0 (thanks to Martin Maechler)

== Changes in svMisc 0.9-71

  • Switch to Github for development; CI added.

  • Code added to make svUnit tests compatibles with R Studio and devtools::test().

== Changes in svMisc 0.9-70

  • Deprecated functions Args(), CallTip(), clipsource(), Complete(), CompletePlus(), getEnvironment(), Parse(), r(), Sys.tempdir(), Sys.userdir() are now defunct and eliminated from the package.

  • Function pkg() is renamed package().

  • Reworked code that was using :::.

== Changes in svMisc 0.9-69

  • On Mac OS X >= 10.7, the package could not load because of a warning (converted into an error) in .onLoad(). Solved. (thanks Travis Porco for bug report).

  • isHelp() now uses find.package() instead of the deprecated .find.package().

== Changes in svMisc 0.9-68

  • The temporary environment that TempEnv() attaches to the search path is now called 'SciViews:TempEnv' instead of simply 'TempEnv' to avoid potential conflicts with other packages in CRAN.

== Changes in svMisc 0.9-67

  • Added the fileEdit() function.

  • Reworked argsTip() function to eliminate old code (for R < 2.10).

  • parseText() reported an error instead of NA in the case last string is incomplete in R 2.15.

== Changes in svMisc 0.9-66

  • Added function isJGR().

  • Added batch processing function batch().

== Changes in svMisc 0.9-65

  • Partial argument matching in completion(), progress() and rmTemp() code fixed.

  • Call to .Internal(...) in captureAll() eliminated, but ned to call .signalSimpleWarning() that is not intended for external use anyway.

  • Call to .Internal(dput(....)) in toRjson() eliminated.

== Changes in svMisc 0.9-64

  • Added listToJson() for conversion of lists of character strings into correct JSON format.

  • Added pkgManXXX() functions to run R code for the SciViews package manager.

== Changes in svMisc 0.9-63

  • progress() used \8, that was treated as octal for R < 2.14. Changed to \b in order to correct this bug. Thanks Duncan Murdoch for pointing me on this.

== Changes in svMisc 0.9-62

  • captureAll() now handles user interrupts and allows for traceback() afterwards and default value for split now changed to TRUE. The 'echo' argument allows for echoing expressions being evaluated, like in the usual console, but a mechanism allows to abbreviate very long expressions.

  • parseText() is reworked internally and it uses the srcfile/srcref mechanism introduced in R recently. firstline, srcfilename and encoding arguments are added.

  • Unit tests added (should run with both svUnit (advised) and RUnit).

  • A bug in objList() is corrected: if the list of objects in the environment is cleared, e.g., by rm(list = ls()), the function returned as if nothing was changed with compare = TRUE. Now, an attribute "changed" is set to TRUE or FALSE to differentiate between "no changes" and "changes towards an empty environment".

== Changes in svMisc 0.9-61

  • Better handling of non syntactically correct names in objList().

== Changes in svMisc 0.9-60

  • A couple of functions are renamed: Parse() -> parseText(), clipsource() -> sourceClipboard(). These functions are declared deprecated, and will become defunct in final version 1.0-0 of the package.

  • captureAll() now returns NA in case of incomplete line of code parsed by parseText(). It also detects if expr is a valid language expression or is NA.

  • isMac() was not working correctly on Mac OS X Leopard and Snow Leopard (bug corrected).

  • Sys.userdir() did not expanded tilde in recent R versions (corrected).

  • Little change in def() arguments: length.out instead of length to use the same name as correcponding argument in rep(). Coercion to logical is now done using as.logical()... but the result may differ from previous implementations.

  • For listTypes(), the convention has changed. Method/type is now separated by an underscore instead as with two dots (like in view_text.default).

  • Sys.tempdir() and Sys.userdir() are deprecated in favor of the new more general functions systemFile() and systemDir().

  • r() is deprecated in favor of pkg() (r is not informative enough and more susceptible to be used elsewere too).

  • Args() is deprecated in favor of argsTip() and CallTip() is deprecated in favor of callTip() (further homogeneization of svMisc function names). The new argsTip() and callTip() functions can reflow the tip to a given width, and callTip() can also return a short description of the function as well as the list of available methods if the tip os asked for a generic function.

  • Complete() and CompletePlus() are deprecated in favor of a unique completion() function. Code of both original functions has been fused and reworked.

== Changes in svMisc 0.9-59

  • RJSON objects now use a customized list() function to build lists, but also structures and new S4 objects.

  • captureAll() has now a 'split' argument that allows to output to the R console, while capturing output.

  • Bug correction in captureAll(): call[[1L]] is not subsettable.

== Changes in svMisc 0.9-58

  • Additions of functions toRjson() and evalRjson() and specification of the RJSON (R-JavaScript Object Notation), an object exchange format not unlike JSON, but richer and more adapted to represent most R objects.

== Changes in svMisc 0.9-57

  • Small changes to objList() (now look at objects in their correct environment).

  • A bug in descArgs() with R >= 2.10 did not allowed to gest arguments description for functions using the '...' argument. Thanks to Diego Zardetto for pointing this bug.

== Changes in svMisc 0.9-56

  • Temporary code to disable in devel R 2.11 in isHelp() and descFun().

== Changes in svMisc 0.9-55

  • Implement descArgs using the new help system (parse_Rd), this eliminates the need for the workaround of version 0.9-54

== Changes in svMisc 0.9-54

  • Cosmetic changes in Rd files to make them compatible with R 2.11 (devel). A part of the example of CompletePlus() is eliminated because it raises an error.

== Changes in svMisc 0.9-53

  • Complete() now sorts items alphabetically and does not return completions as factor type in the data frame any more.

  • CallTip() does a better work to find current function, i.e., not only after the opening parentheses '('.

  • Args() now do no place a space anymore between the name of a function and its arguments

== Changes in svMisc 0.9-52

  • Complete() now manages cases where code is like "iris[", "iris[[", or where last parsed token is empty (in this case, it returns the list of objects loaded in .GlobalEnv).

== Changes in svMisc 0.9-51

  • Complete() now includes additions from Complete2() and CompletePlus()

== Changes in svMisc 0.9-50

  • CompletePlus removes the weird object names ( .M, ...) which were causing trouble

  • CompletePlus handles completions like "a[m"

== Changes in svMisc 0.9-49

  • Complete2() is a temporary new version of Complete()

== Changes in svMisc 0.9-48

  • Parse() does not detect incomplete R code any more, fixed (PhG)

== Changes in svMisc 0.9-47

  • objList(), print.objectList() and write.objList() reworked (PhG)

== Changes in svMisc 0.9-46

  • Added objList(), print() method for 'objList' objects and write.objList() (KB)

  • Localisation complete and French local file done

== Changes in svMisc 0.9-45

  • Made backward compatible with R 2.6.0 (was R >= 2.7.0 in previous version)

  • captureAll() is reworked by Kamil Barton (KB). Debugging code eliminated (data saved in .GlobalEnv for debugging)

  • Error handler added to captureAll() - KB.

== Changes in svMisc 0.9-44

  • CompletePlus() reworked to use man pages instead of .Rd files

  • descFun() and descArgs() added

== Changes in svMisc 0.9-43

  • CompletePlus() created to obtain information on the completion possibilities

== Changes in svMisc 0.9-42

  • objList() did not place each item in a line when result is written in a file

  • objXXX() functions did not always returned results invisibly. Solved.

  • Args() is more robust against bad 'name' parameter because it now calls argsAnywhere() within a try().

== Changes in svMisc 0.9-41

  • objInfo() returns also estimated size of objects that are not functions.

  • objSearch() is reworked to return a single string using 'sep' as separator when sep is not NULL.

== Changes in svMisc 0.9-40

This is the first version distributed on R-forge. It is completely refactored from older versions (on CRAN since 2003) to make it run with SciViews-K and Komodo Edit (Tinn-R is also supported, but not SciViews-R Console any more).

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


1.1.0 by Philippe Grosjean, 8 months ago,

Report a bug at

Browse source code at

Authors: Philippe Grosjean [aut, cre] , Romain Francois [ctb] , Kamil Barton [ctb]

Documentation:   PDF Manual  

GPL-2 license

Imports utils, methods, stats, tools

Suggests rJava, tcltk, covr, knitr, testthat

Imported by ITRSelect, svHttp, svIDE, svSocket, svTools, svWidgets, zooimage.

Depended on by ProgGUIinR, svKomodo.

See at CRAN