From ecortens at mtroyal.ca  Thu Nov 17 23:51:03 2016
From: ecortens at mtroyal.ca (Evan Cortens)
Date: Thu, 17 Nov 2016 15:51:03 -0700
Subject: [Rd] problem with normalizePath()
In-Reply-To: <e6592864a7b34cca92711b6c3c309484@dhhs.nh.gov>
References: <e6592864a7b34cca92711b6c3c309484@dhhs.nh.gov>
Message-ID: <CABKQe-Zh+xoX5geKqYvGMpO1bPx5BjwD61cTY-1tKagLw-KJMA@mail.gmail.com>

I wonder if this could be related to the issue that I submitted to bugzilla
about two months ago? (
https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=17159)

That is to say, could it be that it's treating the first path after the
single backslash as an actual directory, rather than as the name of the
share?

-- 
Evan Cortens, PhD
Institutional Analyst - Office of Institutional Analysis
Mount Royal University
403-440-6529

On Thu, Nov 17, 2016 at 2:28 PM, Laviolette, Michael <
Michael.Laviolette at dhhs.nh.gov> wrote:

> The packages "readxl" and "haven" (and possibly others) no longer access
> files on shared network drives. The problem appears to be in the
> normalizePath() function. The file can be read from a local drive or by
> functions that don't call normalizePath(). The error thrown is
>
> Error: path[1]="\\Hzndhhsvf2/data/OCPH/EPI/BHSDM/Group/17.xls": The
> system cannot find the file specified
>
> Here's my session:
>
> library(readxl)
> library(XLConnect)
>
> # attempting to read file from network drive
> df1 <- read_excel("//Hzndhhsvf2/data/OCPH/EPI/BHSDM/Group/17.xls")
> # pathname is fully qualified, but error thrown as above
>
> cat(normalizePath("//Hzndhhsvf2/data/OCPH/EPI/BHSDM/Group/17.xls"))
> # throws same error
>
> # reading same file with different function
> df2 <- readWorksheetFromFile("//Hzndhhsvf2/data/OCPH/EPI/BHSDM/Group/17.xls",
> 1)
> # completes successfully
>
> # reading same file from local drive
> df3 <- read_excel("C:/17.xls")
> # completes successfully
>
> sessionInfo()
> R version 3.3.2 (2016-10-31)
> Platform: x86_64-w64-mingw32/x64 (64-bit)
> Running under: Windows 7 x64 (build 7601) Service Pack 1
>
> locale:
> [1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United
> States.1252
> [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
> [5] LC_TIME=English_United States.1252
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
> other attached packages:
> [1] readxl_0.1.1         dplyr_0.5.0          XLConnect_0.2-12
> [4] XLConnectJars_0.2-12 ROracle_1.2-1        DBI_0.5-1
>
> loaded via a namespace (and not attached):
> [1] magrittr_1.5   R6_2.2.0       assertthat_0.1 tools_3.3.2    haven_1.0.0
> [6] tibble_1.2     Rcpp_0.12.7    rJava_0.9-8
>
> Please advise.
> Thanks,
>
> Michael Laviolette PhD MPH
> Public Health Statistician
> Bureau of Public Health Statistics and Informatics
> New Hampshire Division of Public Health Services
> 29 Hazen Drive
> Concord, NH 03301-6504
> Phone: 603-271-5688
> Fax: 603-271-7623
> Email: Michael.Laviolette at dhhs.nh.gov
>
>
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

	[[alternative HTML version deleted]]



[Rd] problem with normalizePath()
Evan Cortens