Displaying 5 results from an estimated 5 matches for "emptysetfunc".
Did you mean:
emptysetfuncs
2008 Nov 24
14
how to test for the empty set
...of course, is non-NULL:
is.null(character(0)) # FALSE
So, how can we test if a vector is, say, character(0)? The following
doesn't (seem to) work:
x <- character(0)
x == character(0) # logical(0)
More snooping led to the following:
wiki.r-project.org/rwiki/doku.php?id=tips:surprises:emptysetfuncs
and at the bottom of the page it says "logical(0) is an empty set,
thus is TRUE". However, I get
isTRUE(logical(0)) # FALSE
but, on the other hand,
all.equal(x, character(0)) # TRUE
This would seem to be the solution, but am I missing something? and in
particular, is there an el...
2006 Jan 10
2
Wikis (was about prod(numeric(0)))
Tony Plate <tplate <at> acm.org> writes:
>
> Since the virtue and reliability of Wikis was brought up, I created a R
> Wiki page for this at
>
http://www.sciviews.org/_rgui/wiki/doku.php?id=beginners:surprises:emptysetfuncs
>
>
> Anyone: please correct errors and improve it!
>
> Tony Plate
>
OK, now I have another question:
I see a wiki at
http://fawn.unibw-hamburg.de/cgi-bin/Rwiki.pl?RwikiHome
administered by Detlef Steuer
I see another at http://www.sciviews.org/_rgui/wiki/doku.php
(P...
2006 Jan 10
2
Wikis (was about prod(numeric(0)))
Tony Plate <tplate <at> acm.org> writes:
>
> Since the virtue and reliability of Wikis was brought up, I created a R
> Wiki page for this at
>
http://www.sciviews.org/_rgui/wiki/doku.php?id=beginners:surprises:emptysetfuncs
>
>
> Anyone: please correct errors and improve it!
>
> Tony Plate
>
OK, now I have another question:
I see a wiki at
http://fawn.unibw-hamburg.de/cgi-bin/Rwiki.pl?RwikiHome
administered by Detlef Steuer
I see another at http://www.sciviews.org/_rgui/wiki/doku.php
(P...
2013 Feb 16
2
Handling NA values
Hello again,
I have a question on who sum() handle the NA values.
> sum(c(NA, 1), na.rm = TRUE)
[1] 1
I understand this. However could not agree with following:
> sum(c(NA, NA), na.rm = TRUE)
[1] 0
Where this '0' is coming from? Should not it be NA itself?
Thanks and regards,
2009 Jan 20
5
Problem with subset() function?
Hi all,
Can anyone explain why the following use of
the subset() function produces a different
outcome than the use of the "[" extractor?
The subset() function as used in
density(subset(mydf, ht >= 150.0 & wt <= 150.0, select = c(age)))
appears to me from documentation to be equivalent to
density(mydf[mydf$ht >= 150.0 & mydf$wt <= 150.0, "age"])