[R] Running R 3.2.2 on Mac OS X 10.11.3 - not getting proper response to ls and dir commands ... launching error scripts. See below:

William Dunlap wdunlap at tibco.com
Tue Jan 12 23:58:54 CET 2016


   > getwd()
   [1] "/Users/johnbeyer"
   > dir
   function (path = ".", pattern = NULL, all.files = FALSE, full.names =
FALSE,
       recursive = FALSE, ignore.case = FALSE, include.dirs = FALSE,

Note what a difference the parentheses after the function name make.  With
parentheses,
often with arguments in the parentheses, you call the function; without
parentheses you
get the function definition,



Bill Dunlap
TIBCO Software
wdunlap tibco.com

On Tue, Jan 12, 2016 at 1:22 PM, John Beyer <johnbeyer at me.com> wrote:

> This is what I get when i try to run dir or ls on my R Console:
>
>
>  getwd()
> [1] "/Users/johnbeyer"
> > dir
> function (path = ".", pattern = NULL, all.files = FALSE, full.names =
> FALSE,
>     recursive = FALSE, ignore.case = FALSE, include.dirs = FALSE,
>     no.. = FALSE)
> .Internal(list.files(path, pattern, all.files, full.names, recursive,
>     ignore.case, include.dirs, no..))
> <bytecode: 0x7f8b48c1d428>
> <environment: namespace:base>
> > ls
> function (name, pos = -1L, envir = as.environment(pos), all.names = FALSE,
>     pattern, sorted = TRUE)
> {
>     if (!missing(name)) {
>         pos <- tryCatch(name, error = function(e) e)
>         if (inherits(pos, "error")) {
>             name <- substitute(name)
>             if (!is.character(name))
>                 name <- deparse(name)
>             warning(gettextf("%s converted to character string",
>                 sQuote(name)), domain = NA)
>             pos <- name
>         }
>     }
>     all.names <- .Internal(ls(envir, all.names, sorted))
>     if (!missing(pattern)) {
>         if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
>             ll != length(grep("]", pattern, fixed = TRUE))) {
>             if (pattern == "[") {
>                 pattern <- "\\["
>                 warning("replaced regular expression pattern '[' by
> '\\\\['")
>             }
>             else if (length(grep("[^\\\\]\\[<-", pattern))) {
>                 pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
>                 warning("replaced '[<-' by '\\\\[<-' in regular expression
> pattern")
>             }
>         }
>         grep(pattern, all.names, value = TRUE)
>     }
>     else all.names
> }
> <bytecode: 0x7f8b4a861350>
> <environment: namespace:base>
>
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

	[[alternative HTML version deleted]]



More information about the R-help mailing list