These functions work as they should: did you not read the help page which
explicitly tells you what happens in this case?
The Unix originals work in the same way:
gannet% dirname /my/path/
/my
Please DO study the R posting guide and do the homework requesting of you
before posting.
On Mon, 26
Hi,
> dd <- data.frame(A=c("b","c","a"), B=3:1)
> dd
A B
1 b 3
2 c 2
3 a 1
> unlist(dd)
A1 A2 A3 B1 B2 B3
2 3 1 3 2 1
Someone else might get something different. It all depends on the
values of its 'stringsAsFactors' option:
> dd2 <- data.frame(A=c("b","c","a"), B=3:1, stringsAsFactors=F
On Saturday 24 March 2007 12:12 pm, Gabor Grothendieck wrote:
> It matches in the sense of grep or regexpr
>
> grep("a", "ab") > 0
> regexpr("a", "ab") > 0
>
> Try this:
>
> x <- c("2006-01-01error", "2006-01-01")
> as.Date(x, "%Y-%m-%d") + ifelse(regexpr("^-..-..$", x) > 0, 0, NA)
>
Well, sti
José Luis Aznarte M. wrote:
> Hin-Tak Leung wrote:
>> I don't do 2, 3, 4 that way. I just run the sessions in parallel,
>> and do (no root privilege required):
>>
>> R CMD INSTALL -l sometemplace mypackage
>>
>> and in a parallel session, do
>>
>> library(mypackage, lib.loc="sometemplate")
> Wh
Dear all,
I have already twice encountered a case which I consider a limitation of
dirname() and basename().
In my functions I have a parameter "outfile" which e.g. tells where a file
should be stored. Usually "outfile" is of the form:
oufile = "/my/path/myname.txt"
> outfile <- "/my/path/mynam
On 3/26/07, "José Luis Aznarte M." <[EMAIL PROTECTED]> wrote:
> Hi! I've been browsing through the last months' archive and I can't
> find an answer to my question, so here it is (let's hope it's not too
> obvious):
> I'm working on extensions of an R library, and I would be very
> surprise
José Luis Aznarte M. wrote:
> Hi! I've been browsing through the last months' archive and I can't
> find an answer to my question, so here it is (let's hope it's not too
> obvious):
> I'm working on extensions of an R library, and I would be very
> surprised if everyone developing R package
It depends on the change, but I never install an unreleased package into
the main library, so do not need sudo for 3). I have a 'test-library'
library that is in R_LIBS in ~/.Rprofile and I use solely for package
testing.
If this is a change to the NAMESPACE or an unexported object you do nee
Hi! I've been browsing through the last months' archive and I can't
find an answer to my question, so here it is (let's hope it's not too
obvious):
I'm working on extensions of an R library, and I would be very
surprised if everyone developing R packages is doing the following, as I do:
On 3/26/2007 10:30 AM, Hin-Tak Leung wrote:
> Just been reading R internals, and noticed a typo (duplicate "should")
> - patch attached, and also pasted below:
Thanks, I'll commit the change.
Duncan Murdoch
>
> --- ./doc/manual/R-ints.texi.orig 2007-02-13 10:30:38.0 +
> +++ ./
Just been reading R internals, and noticed a typo (duplicate "should")
- patch attached, and also pasted below:
--- ./doc/manual/R-ints.texi.orig 2007-02-13 10:30:38.0 +
+++ ./doc/manual/R-ints.texi2007-03-26 15:25:08.0 +0100
@@ -1093,7 +1093,7 @@
contain references
Good catch, there is even one more problem I believe - it can still
run past the beginning of the buffer (e.g. if you use "///").
This is a bit more more efficient due to fewer calls to strlen and
fixes both problems:
if (*buf) {
p = buf + strlen(buf) - 1;
while (p>=buf && *p == fsp) *(
12 matches
Mail list logo