[R] dir.create only gives first character of name when warning

From: Keith Ponting <k.ponting_at_aurix.com>
Date: Fri, 14 Nov 2008 11:37:08 -0500


This is not a major issue, but is there any way to get the full directory name out when dir.create issues a warning? I am running R 2.8.0 patched on Windows Vista - full details below.

With the following code:
  dir.create("test")
  obscure<-"test"
  dir.create(obscure)
I get the warning message:
  In dir.create(obscure) : 't' already exists

Session details:

R version 2.8.0 Patched (2008-10-21 r46766) Copyright (C) 2008 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R.

> dir.create("test")
> obscure<-"test"
> dir.create(obscure)

Warning message:
In dir.create(obscure) : 't' already exists
> sessionInfo()

R version 2.8.0 Patched (2008-10-21 r46766) i386-pc-mingw32

locale:
LC_COLLATE=English_United Kingdom.1252;LC_CTYPE=English_United Kingdom.1252;LC_MONETARY=English_United
Kingdom.1252;LC_NUMERIC=C;LC_TIME=English_United Kingdom.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

Thanks in advance,

Keith Ponting
Aurix Ltd, Malvern WR14 3SZ UK



R-help_at_r-project.org mailing list
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. Received on Fri 14 Nov 2008 - 17:50:04 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 14 Nov 2008 - 18:30:24 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive