Thank you -- I missed the bit about the invisible attribute.
Can this happen with pipe, as well?
x = readLines(pipe("perl -e 'print \"foo\\\n\";exit(-1);'"))
x
[1] "foo"
I'd want to know that the command failed so I can process x differently.
Than
Hi --
Is there a way of detecting the exit code while calling system or pipe?
eg (on Unix)
system("perl -e 'print \"foo\\\n\";exit(-1);'")
foo
Any help appreciated,
Ranjan
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/
Hi --
Is there a way of detecting the exit code while calling system or pipe?
eg (on Unix)
system("perl -e 'print \"foo\\\n\";exit(-1);'")
foo
Any help appreciated,
Ranjan
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/
On Wed, 5 Dec 2007, Prof Brian Ripley wrote:
>[...]
Thanks I'll read it more carefully.
> Perhaps if you told us what you are trying to achieve we might be able to
> help you achieve it.
>
I have a function which takes a date as an argument. I've tested it, and
I'd like to run it over a ran
Hi --
I just noticed the following (R 2.6.1 on OSX)
> lapply(c(as.Date('2007-01-01')), I)
[[1]]
[1] 13514
This is a bit surprising.. Why does lapply unclass the object? Sorry for
such a basic question, I don't seem able to produce the right google keywords.
Ranjan
___
Hi --
I'm working with some data frames with fairly high nrows (call it 8
columns, by 20,000 rows). Are there any indexes on these columns?
When I do a df[df$foo == 42,] [which I think is idiomatic], am I doing a linear
search or something better? If the column contents is ordered, I'd like
Thanks... that's very helpful. Sorry about the typo too
> t1 <- t[t$bob < 50, ,drop=F]
> t1
[1] bob
<0 rows> (or 0-length row.names)
> order(t$bob)
[1] 1
>
On Mon, 1 Oct 2007, Petr PIKAL wrote:
> Hi
>
> [EMAIL PROTECTED] napsal dne 01.10.2007 18:01:13:
>
>> I'm fairly new to R, coming from a pr
I'm fairly new to R, coming from a programming background -- it's quite
nice to work with dataframes, though, as opposed to explicit iteration.
One thing I've found, which is surprising is that zero-length dataframes
seem to cause errors:
> t <- data.frame(bob=c(100))
> order(t$bob)
[1] 1
> t1
8 matches
Mail list logo