On Mon, 27 Sep 2021 14:54:53 -0700
Bert Gunter wrote:
> ... and also note in the *Color Specification* section of ?par, to
> which ?points points,
>
> "Additionally, "transparent" is transparent, useful for filled areas
> (such as the background!), and just invisible for things like lines or
> t
... and also note in the *Color Specification* section of ?par, to
which ?points points,
"Additionally, "transparent" is transparent, useful for filled areas
(such as the background!), and just invisible for things like lines or
text. In most circumstances (integer) NA is equivalent to
"transparen
?text says
"... NA values of font are replaced by par("font"), and similarly for col."
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Mon, Sep 27, 2021 at 2:
I've just noticed what seems to me to be somewhat peculiar behaviour in
respect of how different plotting functions treat a specification
"col=NA".
Consider:
plot(1:10)
text(4,6,labels="o",col=NA)
points(6,4,col=NA)
The symbol produced by the call to text() shows up (is black).
The symbol prod
Hi,
I tried to manage exponential family state-space model with the packages
KFAS and sspir.
The problem is that my data set includes some NA observation and it seems
not working.
Any suggestion?
Thanks in advance,
Federico
--
View this message in context:
http://r.789695.n4.nabble.com/NA-val
Hi,
I tried to manage exponential family state-space model with the packages
KFAS.
The problem is that my data set includes some NA observation and it seems
not working.
Any suggestion?
Thanks in advance,
Federico
--
View this message in context:
http://r.789695.n4.nabble.com/R-pkgs-New-packa
On Fri, Mar 26, 2010 at 4:15 PM, Matthew Dowle wrote:
> The type of 'NA' is logical. So x[NA] behaves more like x[TRUE] i.e. silent
> recycling.
>
>> class(NA)
> [1] "logical"
>> x=101:108
>> x[NA]
> [1] NA NA NA NA NA NA NA NA
>> x[c(TRUE,NA)]
> [1] 101 NA 103 NA 105 NA 107 NA
>
>> x[as.integ
On Fri, Mar 26, 2010 at 4:15 PM, Bert Gunter wrote:
> Is this, from the man page, relevant?
>
> "An empty index selects all values: this is most often used to replace all
> the entries but keep the attributes. "
No, I think that means doing "x[]", and only in replacement:
> x=101:105
> attr(x,"
-boun...@r-project.org] On
Behalf Of Barry Rowlingson
Sent: Friday, March 26, 2010 5:10 AM
To: r-help@r-project.org
Subject: [R] NA values in indexing
If you index a vector with a vector that has NA in it, you get NA back:
> x=101:107
> x[c(NA,4,NA)]
[1] NA 104 NA
> x[c(4,NA)]
[1] 104 NA
Try
> x <- 101:107
> x[c(NA_integer_, NA_integer_)]
[1] NA NA
On Fri, Mar 26, 2010 at 8:09 AM, Barry Rowlingson
wrote:
> If you index a vector with a vector that has NA in it, you get NA back:
>
> > x=101:107
> > x[c(NA,4,NA)]
> [1] NA 104 NA
> > x[c(4,NA)]
> [1] 104 NA
>
> All well and
The type of 'NA' is logical. So x[NA] behaves more like x[TRUE] i.e. silent
recycling.
> class(NA)
[1] "logical"
> x=101:108
> x[NA]
[1] NA NA NA NA NA NA NA NA
> x[c(TRUE,NA)]
[1] 101 NA 103 NA 105 NA 107 NA
> x[as.integer(NA)]
[1] NA
HTH
Matthew
"Barry Rowlingson" wrote in message
news
If you index a vector with a vector that has NA in it, you get NA back:
> x=101:107
> x[c(NA,4,NA)]
[1] NA 104 NA
> x[c(4,NA)]
[1] 104 NA
All well and good. ?"[" says, under NAs in indexing:
When extracting, a numerical, logical or character ‘NA’ index
picks an unknown element
I am fitting a model using zeroinfl() and it runs without errors,
returning results that are generally consistent with my hypotheses.
One of my variables is percent black (pblack). This variable was highly
significant in some of the other count models I ran on the way to my
current formulation
Thanks again for all the help, now I was able to write the function I need:
namax <- function(m,mp) {
# arguments: matrix, maximum percentage of NA values allowed in rows/colums
c1 <- 0
c2 <- 0
repeat {
nas1 <- rowMeans(is.na(m))
nas2 <- col
Thanks a lot, this works! The one I used before was wrong:
> data_matrix
[,1] [,2] [,3] [,4] [,5]
[1,]11 NA11
[2,]22222
[3,]33333
[4,] NA NA NA NA NA
[5,]55555
[6,] NA66 NA6
[7,] NA NA
On Mon, Jul 6, 2009 at 12:12 AM, nyk wrote:
>
> Thanks for your reply! This is what I was looking for!
> I'm using
> nas1 <- apply(data_matrix,1,function(x)sum(is.na(x))/nrow(data_matrix))
> nas2 <- apply(data_matrix,2,function(x)sum(is.na(x))/ncol(data_matrix))
You can simplify this a little:
pe
Thanks for your reply! This is what I was looking for!
I'm using
nas1 <- apply(data_matrix,1,function(x)sum(is.na(x))/nrow(data_matrix))
nas2 <- apply(data_matrix,2,function(x)sum(is.na(x))/ncol(data_matrix))
The thing about "significantly more" isn't really a helpful as I look at the
data now.
I
On Jul 4, 2009, at 9:22 PM, nyk wrote:
I have a data matrix containing quite a lot of missing values (NA).
I know
how to remove all column or rows containing NA values, but is there
a some
standard method for removing not all NA containing rows/column, but
only
those which have signific
I have a data matrix containing quite a lot of missing values (NA). I know
how to remove all column or rows containing NA values, but is there a some
standard method for removing not all NA containing rows/column, but only
those which have significantly more NAs than others?
--
View this message
Dear list,
as a result of a logical operation I want to assign
a new variable to a DF with NA-values.
z <- data.frame( x = c(5,6,5,NA,7,5,4,NA),
y = c(1,2,2,2,2,2,2,2) )
p <- (z$x <= 5) & (z$y == 1)
p
z[p, "p1"] <-5
z
# ok, this works fine
z <- z[,-3]
p <- (z$x <= 5) & (z$y =
Yes, thanks a lot! It works fine!
Eleni
On Nov 21, 2007 2:03 PM, Ted Harding <[EMAIL PROTECTED]> wrote:
>
> On 21-Nov-07 11:15:32, Eleni Christodoulou wrote:
> > Hi all!
> > I am new to R and I would like to ask you the following question:
> > How can I substitute the NA values with 0 in a data f
On 21-Nov-07 11:15:32, Eleni Christodoulou wrote:
> Hi all!
> I am new to R and I would like to ask you the following question:
> How can I substitute the NA values with 0 in a data frame?
> I cannot find a command to check if a value is NA...
>
> Thank you very much!
> Eleni
As has been said, is
?is.na
On Nov 21, 2007 12:15 PM, Eleni Christodoulou <[EMAIL PROTECTED]> wrote:
> Hi all!
>
> I am new to R and I would like to ask you the following question:How
> can I substitute the NA values with 0 in a data frame? I cannot find a
> command to check if a value is NA...
>
> Thank you very muc
Eleni, this question appears about every month on this list,
try using the RSiteSearch command before posting. Thanks.
RSiteSearch("replace NA")
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/109176.html
Gabor
On Wed, Nov 21, 2007 at 01:15:32PM +0200, Eleni Christodoulou wrote:
> Hi all!
>
>
Hi all!
I am new to R and I would like to ask you the following question:How
can I substitute the NA values with 0 in a data frame? I cannot find a
command to check if a value is NA...
Thank you very much!
Eleni
__
R-help@r-project.org mailing list
htt
25 matches
Mail list logo