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

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Fri, 14 Nov 2008 17:53:17 +0000 (GMT)

You are running an outdated R-patched. The current version's CHANGES file says

     o dir.create() did not print the path correctly in warning messages.

and your example works for me.

On Fri, 14 Nov 2008, Keith Ponting wrote:

> 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.
>

-- 
Brian D. Ripley,                  ripley_at_stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
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:55:08 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