Displaying 20 results from an estimated 35 matches for "r_expandfilename".
2001 Feb 15
3
who frees dd and xd in X11_Open?
...c/unix/X11/devX11.c):
/* if we have to bail out with "error", then must free(dd) and free(xd) */
A couple lines down, there is:
if (!strncmp(dsp, "png::", 5)) {
FILE *fp;
#ifndef HAVE_PNG
error("No png support in this version of R");
#endif
if (!(fp = R_fopen(R_ExpandFileName(dsp+5), "w")))
error("could not open PNG file `%s'", dsp+6);
...
So what does the comment imply? If error jumps out to the toplevel
without giving X11DeviceDriver a chance to free dd and xd, then this
should be:
if (!strncmp(dsp, "png::", 5)) {
FIL...
2019 Jun 06
4
Open a file which name contains a tilde
...chwidom <schwidom at gmx.net> wrote:
> +> path.expand("a ~ b")
> [1] "a /home/user b"
> How can I switch off any file crippling activity?
It doesn't seem to be possible if readline is enabled and works
correctly.
Calls to path.expand [1] end up [2] in R_ExpandFileName [3], which
calls R_ExpandFileName_readline [4], which uses libreadline function
tilde_expand [5]. tilde_expand seems to be designed to expand '~'
anywhere in the string it is handed, i.e. operate on whole command
lines, not file paths.
I am taking the liberty of Cc-ing R-devel in case this...
2019 Jun 05
6
Open a file which name contains a tilde
Hi,
As I can see via path.expand a filename which contains a tilde anywhere gets automatically crippled.
+> path.expand("a ~ b")
[1] "a /home/user b"
+> path.expand("a ~ b ~")
[1] "a /home/user b /home/user"
I want to open a file regardless whether its name contains any character unless 0.
The unix filesystem allow the creation of such files, it
2019 Jun 05
6
Open a file which name contains a tilde
Hi,
As I can see via path.expand a filename which contains a tilde anywhere gets automatically crippled.
+> path.expand("a ~ b")
[1] "a /home/user b"
+> path.expand("a ~ b ~")
[1] "a /home/user b /home/user"
I want to open a file regardless whether its name contains any character unless 0.
The unix filesystem allow the creation of such files, it
2013 Jan 11
1
Patch for setwd() to show path in error message
...r_t *path = filenameToWchar(STRING_ELT(s, 0), TRUE);
if(_wchdir(path) < 0)
- error(_("cannot change working directory"));
+ error(_("cannot change working directory to '%s'"), path);
}
#else
{
const char *path
= R_ExpandFileName(translateChar(STRING_ELT(s, 0)));
if(chdir(path) < 0)
- error(_("cannot change working directory"));
+ error(_("cannot change working directory to '%s'"), path);
}
#endif
return(wd);
TRANSLATIONS:
I have zero experience with GNU gettext/*....
2019 Jun 07
2
[R] Open a file which name contains a tilde
...quot;a ~ b")
>>> [1] "a /home/user b"
>>
>>> How can I switch off any file crippling activity?
>>
>> It doesn't seem to be possible if readline is enabled and works
>> correctly.
>>
>> Calls to path.expand [1] end up [2] in R_ExpandFileName [3], which
>> calls R_ExpandFileName_readline [4], which uses libreadline function
>> tilde_expand [5]. tilde_expand seems to be designed to expand '~'
>> anywhere in the string it is handed, i.e. operate on whole command
>> lines, not file paths.
>>
>>...
2001 Sep 06
2
file.copy() problems on WinNT (PR#1085)
For some files, file.copy() doesn't copy these files correctly.
Here you will find a file (Bitmap, 769Kb) to reproduce the problem:
http://www.statistik.uni-dortmund.de/leute/ligges/R/test1.bmp
Using
file.copy("c:/test1.bmp", "c:/test2.bmp", overwrite = TRUE)
produces a second file with the size of ~1.4 Mb:
http://www.statistik.uni-dortmund.de/leute/ligges/R/test2.bmp
2019 Jun 11
3
[R] Open a file which name contains a tilde
...; > > How can I switch off any file crippling activity?
> > > >
> > > > It doesn't seem to be possible if readline is enabled and works
> > > > correctly.
> > > >
> > > > Calls to path.expand [1] end up [2] in R_ExpandFileName [3],
> which
> > > > calls R_ExpandFileName_readline [4], which uses libreadline
> function
> > > > tilde_expand [5]. tilde_expand seems to be designed to expand
> '~'
> > > > anywhere in the string it is handed, i.e. operate on wh...
2019 Jun 06
0
[R] Open a file which name contains a tilde
...d("a ~ b")
>>> [1] "a /home/user b"
>>
>>> How can I switch off any file crippling activity?
>>
>> It doesn't seem to be possible if readline is enabled and works
>> correctly.
>>
>> Calls to path.expand [1] end up [2] in R_ExpandFileName [3], which
>> calls R_ExpandFileName_readline [4], which uses libreadline function
>> tilde_expand [5]. tilde_expand seems to be designed to expand '~'
>> anywhere in the string it is handed, i.e. operate on whole command
>> lines, not file paths.
>>
>> I...
2019 Jun 06
0
[R] Open a file which name contains a tilde
...gt;
> > +> path.expand("a ~ b")
> > [1] "a /home/user b"
>
> > How can I switch off any file crippling activity?
>
> It doesn't seem to be possible if readline is enabled and works
> correctly.
>
> Calls to path.expand [1] end up [2] in R_ExpandFileName [3], which
> calls R_ExpandFileName_readline [4], which uses libreadline function
> tilde_expand [5]. tilde_expand seems to be designed to expand '~'
> anywhere in the string it is handed, i.e. operate on whole command
> lines, not file paths.
>
> I am taking the liberty o...
2002 May 02
1
Returning a dataframe from a C function (How) ?
I'm writing an R extension. The language I'm using is ANSI C. One of the
functions I'm writing will accept a string and return a dataset as a
dataframe. i.e the prototype will be of the form:
dataframe foo(R_String)
{
}
Does anyone have any skeleton code for such a function, i.e. one that
receives an R "string" and returns a dataset as a dataframe ?
The main concerns I
2003 Jun 25
1
Mac carbon - foreign - read.spss
Hello,
Can someone confirm that "read.spss" doesn't work with
usual (old) mac paths ("disk:dir:dir:file"), but only with
*nix path (Volumes/disk/...)?
rm171 (carbon) - MacOSX 10.2.6
Thanks.
--
------------------------------------------------------------------------------
Jean-Pierre Muller
SSP / UNIL / BFSH2 / CH-1015 Lausanne
2013 Oct 03
0
[PATCH] file.access returns success for NA
...s be considered?
Below is a patch that changes the return of an NA to NA.
Index: trunk/src/main/platform.c
===================================================================
--- trunk/src/main/platform.c (revision 64011)
+++ trunk/src/main/platform.c (working copy)
@@ -1299,7 +1299,7 @@
access(R_ExpandFileName(translateChar(STRING_ELT(fn, i))),
modemask);
#endif
- } else INTEGER(ans)[i] = FALSE;
+ } else INTEGER(ans)[i] = NA_INTEGER;
UNPROTECT(1);
return ans;
}
Comments?
Scott
> sessionInfo()
R Under development (unstable) (2013-09-27 r64011)
Platform: x86_64-unknown-linux-gnu (...
2019 Jun 11
0
[R] Open a file which name contains a tilde
...;
> > >
> > > > How can I switch off any file crippling activity?
> > >
> > > It doesn't seem to be possible if readline is enabled and works
> > > correctly.
> > >
> > > Calls to path.expand [1] end up [2] in R_ExpandFileName [3], which
> > > calls R_ExpandFileName_readline [4], which uses libreadline function
> > > tilde_expand [5]. tilde_expand seems to be designed to expand '~'
> > > anywhere in the string it is handed, i.e. operate on whole command
> > >...
2019 Jun 08
0
[R] Open a file which name contains a tilde
...1] "a /home/user b"
> >>
> >>> How can I switch off any file crippling activity?
> >>
> >> It doesn't seem to be possible if readline is enabled and works
> >> correctly.
> >>
> >> Calls to path.expand [1] end up [2] in R_ExpandFileName [3], which
> >> calls R_ExpandFileName_readline [4], which uses libreadline function
> >> tilde_expand [5]. tilde_expand seems to be designed to expand '~'
> >> anywhere in the string it is handed, i.e. operate on whole command
> >> lines, not file paths....
2019 Jun 08
0
[R] Open a file which name contains a tilde
...b"
>>>>
>>>>> How can I switch off any file crippling activity?
>>>>
>>>> It doesn't seem to be possible if readline is enabled and works
>>>> correctly.
>>>>
>>>> Calls to path.expand [1] end up [2] in R_ExpandFileName [3], which
>>>> calls R_ExpandFileName_readline [4], which uses libreadline function
>>>> tilde_expand [5]. tilde_expand seems to be designed to expand '~'
>>>> anywhere in the string it is handed, i.e. operate on whole command
>>>> lines, not...
2019 Jun 11
2
[R] Open a file which name contains a tilde
...?
> > > > >
> > > > > It doesn't seem to be possible if readline is enabled and
> > works
> > > > > correctly.
> > > > >
> > > > > Calls to path.expand [1] end up [2] in R_ExpandFileName
> [3],
> > which
> > > > > calls R_ExpandFileName_readline [4], which uses
> libreadline
> > function
> > > > > tilde_expand [5]. tilde_expand seems to be designed to
> expand
> > '~'
> >...
2001 Dec 21
0
{R} 1.4.0 compiling failed on sun sparc solaris 2.6
...mt100): ../../../bin/R --vanilla --slave < all.R
initializing class and method definitions now
Bus Error (core dumped)
(mt100): dbx ../../../bin/R.bin core
Reading R.bin
[...]
program terminated by signal BUS (invalid address alignment)
Current function is gzfile_open
750 fp = gzopen(R_ExpandFileName(con->description), con->mode);
(dbx) where
[1] deflateEnd(0xaf0e18, 0xef429758, 0x115f188, 0x11700e0, 0xef423138, 0xef3c5b3c), at 0xef6b4be0
[2] destroy(0xaf0e18, 0x6, 0x8, 0xfffffff1, 0x8, 0x0), at 0xef6b2e48
[3] gz_open(0xaf0e18, 0x1122734, 0xffffffff, 0x0, 0x0, 0x0), at 0xef6b25a8...
2019 Jun 12
2
[R] Open a file which name contains a tilde
...t;> > > >
>>>> > > > It doesn't seem to be possible if readline is enabled and
>>>> works
>>>> > > > correctly.
>>>> > > >
>>>> > > > Calls to path.expand [1] end up [2] in R_ExpandFileName
>>> [3],
>>>> which
>>>> > > > calls R_ExpandFileName_readline [4], which uses
>>> libreadline
>>>> function
>>>> > > > tilde_expand [5]. tilde_expand seems to be designed to
>>> expand
>>&g...
2019 Jun 13
2
[R] Open a file which name contains a tilde
...gt; > > It doesn't seem to be possible if readline is enabled and
> > >>>> works
> > >>>> > > > correctly.
> > >>>> > > >
> > >>>> > > > Calls to path.expand [1] end up [2] in R_ExpandFileName
> > >>> [3],
> > >>>> which
> > >>>> > > > calls R_ExpandFileName_readline [4], which uses
> > >>> libreadline
> > >>>> function
> > >>>> > > > tilde_expand [5]. tilde_e...