Se ha borrado un texto insertado con un juego de caracteres sin especificar... Nombre: no disponible Url: https://stat.ethz.ch/pipermail/r-help/attachments/20080424/2226f24e/attachment.pl
Javier Mu?oz wrote:> Hello, > > This is what i get in R-2.7.0 (with the completely internal file.path()): > > >> setwd("c:/jml/Valoraci?n F1/04 BA/") >> filename <- "Valoraci?n F1 PAG.mdb" >> > > >> file.path(getwd(), filename) >> > [1] "c:/jml/Valoraci?n F1/04 BA/Valoraci?n F1 PAG.mdb" <<- worng > > >> file.path("c:/jml/Valoraci?n F1/04 BA", filename) >> > [1] "c:/jml/Valoraci?n F1/04 BA/Valoraci?n F1 PAG.mdb" <<- ok > > >> file.path(paste(getwd()), filename) >> > [1] "c:/jml/Valoraci?n F1/04 BA/Valoraci?n F1 PAG.mdb" <<- ok > > With the older file.path() all of these return "c:/jml/Valoraci?n F1/04 > BA/Valoraci?n F1 PAG.mdb" > > -- Session info ----------------------- > > R version 2.7.0 (2008-04-22) > i386-pc-mingw32 > > locale: > LC_COLLATE=Spanish_Spain.1252;LC_CTYPE=Spanish_Spain.1252;LC_MONETARY=Spanish_Spain.1252;LC_NUMERIC=C;LC_TIME=Spanish_Spain.1252 > > attached base packages: > [1] stats graphics grDevices datasets utils methods base > > other attached packages: > [1] RODBC_1.2-3 > > ---------------- > > Is this a bug in the new file.path() or can I change something to make this > work as before? >This could well be related to the PATH issue reported yesterday by Erik Joergensen, so please check whether R-patched fixes the issue (and please make a habit of checking our prereleases...). (Email encodings again: I assume that you see something weird in the one place where I see the accented o in valoraci?n, whereas you see the accented o in all the places where I see a reverse-video question mark....) -- O__ ---- Peter Dalgaard ?ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
See my reply to Erik J?rgensen yesterday. Can you please send that again with a marked encoding, so we have a chance of reading it? Or attach it as a plain text file and tell us what encoding the file is in? Yes, there probably is a bug here but we do need to be able to reproduce it. On Thu, 24 Apr 2008, Javier Mu?oz wrote:> Hello, > > This is what i get in R-2.7.0 (with the completely internal file.path()): > >> setwd("c:/jml/Valoraci?n F1/04 BA/") >> filename <- "Valoraci?n F1 PAG.mdb" > >> file.path(getwd(), filename) > [1] "c:/jml/Valoraci??n F1/04 BA/Valoraci?n F1 PAG.mdb" <<- worng > >> file.path("c:/jml/Valoraci?n F1/04 BA", filename) > [1] "c:/jml/Valoraci?n F1/04 BA/Valoraci?n F1 PAG.mdb" <<- ok > >> file.path(paste(getwd()), filename) > [1] "c:/jml/Valoraci?n F1/04 BA/Valoraci?n F1 PAG.mdb" <<- ok > > With the older file.path() all of these return "c:/jml/Valoraci?n F1/04 > BA/Valoraci?n F1 PAG.mdb" > > -- Session info ----------------------- > > R version 2.7.0 (2008-04-22) > i386-pc-mingw32 > > locale: > LC_COLLATE=Spanish_Spain.1252;LC_CTYPE=Spanish_Spain.1252;LC_MONETARY=Spanish_Spain.1252;LC_NUMERIC=C;LC_TIME=Spanish_Spain.1252 > > attached base packages: > [1] stats graphics grDevices datasets utils methods base > > other attached packages: > [1] RODBC_1.2-3 > > ---------------- > > Is this a bug in the new file.path() or can I change something to make this > work as before? > > Thanks. > > Javier. > > [[alternative HTML version deleted]] > >-- 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
Sorry, this is the same test with R-patched (same results as well).> setwd("c:/jml/Valoraci?n F1/04 BA/") > filename <- "Valoraci?n F1 PAG.mdb"> file.path(getwd(), filename)[1] "c:/jml/Valoraci??n F1/04 BA/Valoraci?n F1 PAG.mdb" <<- wrong> file.path("c:/jml/Valoraci?n F1/04 BA", filename)[1] "c:/jml/Valoraci?n F1/04 BA/Valoraci?n F1 PAG.mdb" <<- ok> file.path(paste(getwd()), filename)[1] "c:/jml/Valoraci?n F1/04 BA/Valoraci?n F1 PAG.mdb" <<-ok> getwd()[1] "c:/jml/Valoraci?n F1/04 BA" -------------------- R version 2.7.0 Patched (2008-04-23 r45466) i386-pc-mingw32 locale: LC_COLLATE=Spanish_Spain.1252;LC_CTYPE=Spanish_Spain.1252;LC_MONETARY=Spanish_Spain.1252;LC_NUMERIC=C;LC_TIME=Spanish_Spain.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] RODBC_1.2-3 ---------------------- Thanks again. 2008/4/24, Prof Brian Ripley <ripley en stats.ox.ac.uk>:> See my reply to Erik J?rgensen yesterday. > > Can you please send that again with a marked encoding, so we have a chance of reading it? Or attach it as a plain text file and tell us what encoding the file is in? > > Yes, there probably is a bug here but we do need to be able to reproduce it. > > On Thu, 24 Apr 2008, Javier Mu?oz wrote: > > > > Hello, > > > > This is what i get in R-2.7.0 (with the completely internal file.path()): > > > > > > > setwd("c:/jml/Valoraci?n F1/04 BA/") > > > filename <- "Valoraci?n F1 PAG.mdb" > > > > > > > > > > file.path(getwd(), filename) > > > > > [1] "c:/jml/Valoraci??n F1/04 BA/Valoraci?n F1 PAG.mdb" <<- worng > > > > > > > file.path("c:/jml/Valoraci?n F1/04 BA", filename) > > > > > [1] "c:/jml/Valoraci?n F1/04 BA/Valoraci?n F1 PAG.mdb" <<- ok > > > > > > > file.path(paste(getwd()), filename) > > > > > [1] "c:/jml/Valoraci?n F1/04 BA/Valoraci?n F1 PAG.mdb" <<- ok > > > > With the older file.path() all of these return "c:/jml/Valoraci?n F1/04 > > BA/Valoraci?n F1 PAG.mdb" > > > > -- Session info ----------------------- > > > > R version 2.7.0 (2008-04-22) > > i386-pc-mingw32 > > > > locale: > > LC_COLLATE=Spanish_Spain.1252;LC_CTYPE=Spanish_Spain.1252;LC_MONETARY=Spanish_Spain.1252;LC_NUMERIC=C;LC_TIME=Spanish_Spain.1252 > > > > attached base packages: > > [1] stats graphics grDevices datasets utils methods base > > > > other attached packages: > > [1] RODBC_1.2-3 > > > > ---------------- > > > > Is this a bug in the new file.path() or can I change something to make this > > work as before? > > > > Thanks. > > > > Javier. > > > > [[alternative HTML version deleted]] > > > > > > > > -- > Brian D. Ripley, ripley en 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
I can read that version, thanks. The issue is probably that getwd() and filename are in different encodings, and file.path() was not expecting that. You need R-patched >= r45490 for that fix. On Thu, 24 Apr 2008, Javier Mu?oz wrote:> Sorry, > this is the same test with R-patched (same results as well). > >> setwd("c:/jml/Valoraci?n F1/04 BA/") >> filename <- "Valoraci?n F1 PAG.mdb" > >> file.path(getwd(), filename) > [1] "c:/jml/Valoraci??n F1/04 BA/Valoraci?n F1 PAG.mdb" <<- wrong > >> file.path("c:/jml/Valoraci?n F1/04 BA", filename) > [1] "c:/jml/Valoraci?n F1/04 BA/Valoraci?n F1 PAG.mdb" <<- ok > >> file.path(paste(getwd()), filename) > [1] "c:/jml/Valoraci?n F1/04 BA/Valoraci?n F1 PAG.mdb" <<-ok > >> getwd() > [1] "c:/jml/Valoraci?n F1/04 BA" > > -------------------- > R version 2.7.0 Patched (2008-04-23 r45466) > i386-pc-mingw32 > > locale: > LC_COLLATE=Spanish_Spain.1252;LC_CTYPE=Spanish_Spain.1252;LC_MONETARY=Spanish_Spain.1252;LC_NUMERIC=C;LC_TIME=Spanish_Spain.1252 > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > other attached packages: > [1] RODBC_1.2-3 > > ---------------------- > > Thanks again. > > 2008/4/24, Prof Brian Ripley <ripley at stats.ox.ac.uk>: >> See my reply to Erik J?rgensen yesterday. >> >> Can you please send that again with a marked encoding, so we have a >> chance of reading it? Or attach it as a plain text file and tell us >> what encoding the file is in? >> >> Yes, there probably is a bug here but we do need to be able to reproduce it. >> >> On Thu, 24 Apr 2008, Javier Mu?oz wrote: >> >> >>> Hello, >>> >>> This is what i get in R-2.7.0 (with the completely internal file.path()): >>> >>> >>>> setwd("c:/jml/Valoraci?n F1/04 BA/") >>>> filename <- "Valoraci?n F1 PAG.mdb" >>>> >>> >>> >>>> file.path(getwd(), filename) >>>> >>> [1] "c:/jml/Valoraci??n F1/04 BA/Valoraci?n F1 PAG.mdb" <<- worng >>> >>> >>>> file.path("c:/jml/Valoraci?n F1/04 BA", filename) >>>> >>> [1] "c:/jml/Valoraci?n F1/04 BA/Valoraci?n F1 PAG.mdb" <<- ok >>> >>> >>>> file.path(paste(getwd()), filename) >>>> >>> [1] "c:/jml/Valoraci?n F1/04 BA/Valoraci?n F1 PAG.mdb" <<- ok >>> >>> With the older file.path() all of these return "c:/jml/Valoraci?n F1/04 >>> BA/Valoraci?n F1 PAG.mdb" >>> >>> -- Session info ----------------------- >>> >>> R version 2.7.0 (2008-04-22) >>> i386-pc-mingw32 >>> >>> locale: >>> LC_COLLATE=Spanish_Spain.1252;LC_CTYPE=Spanish_Spain.1252;LC_MONETARY=Spanish_Spain.1252;LC_NUMERIC=C;LC_TIME=Spanish_Spain.1252 >>> >>> attached base packages: >>> [1] stats graphics grDevices datasets utils methods base >>> >>> other attached packages: >>> [1] RODBC_1.2-3 >>> >>> ---------------- >>> >>> Is this a bug in the new file.path() or can I change something to make this >>> work as before? >>> >>> Thanks. >>> >>> Javier. >>> >>> [[alternative HTML version deleted]] >>> >>> >>> >> >> -- >> 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 >-- 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