I highly recommend making friends with the str function. Try
str( 1 )
str( 1:2 )
for the clue you need, and then
sapply( 1:2, identical, 1L )
--
Sent from my phone. Please excuse my brevity.
On April 8, 2016 3:24:31 PM PDT, "Paulson, Ariel" wrote:
>Sorry if this has been answered elsewhere,
Sorry if this has been answered elsewhere, but I can't find any discussion of
it.
Wondering why the following situation occurs (duplicated on 3.2.2 CentOS6 and
3.0.1 Win2k, so I don't think it is a bug):
> sapply(1, identical, 1)
[1] TRUE
> sapply(1:2, identical, 1)
[1] FALSE FALSE
> sapply(1
On 07/04/14 02:00, Rguy wrote:
I have two data frames that I believe are identical, yet checking them with
identical() fails.
Each data frame has two columns named 'pk' and 'newv_f13__bool'. As shown
below, the columns of the data frames are identical, according to the
identical() function, yet
On Apr 6, 2014, at 7:00 AM, Rguy wrote:
I have two data frames that I believe are identical, yet checking
them with
identical() fails.
Each data frame has two columns named 'pk' and 'newv_f13__bool'. As
shown
below, the columns of the data frames are identical, according to the
identical(
I have two data frames that I believe are identical, yet checking them with
identical() fails.
Each data frame has two columns named 'pk' and 'newv_f13__bool'. As shown
below, the columns of the data frames are identical, according to the
identical() function, yet the data frames themselves are no
Hello Guys,
I am trying to build R using the Intel compilers: ICC, ICPC. The first time I
ran the built I got the error below:
mlutils.c(107): error: floating-point operation result is out of range
double NA_REAL = ML_NAN;
^
mlutils.c(108): error: floating-point operation re
Please stop posting and re-posting the same questions.
Michael
On Sunday, November 18, 2012, Haris Rhrlp wrote:
> Dear R users,
>
>
> I want to check matrices when i change the order of the rows or/and the
> order of the columns or/and the combination of them
>
> i will give an example what i wa
Dear R users,
I want to check matrices when i change the order of the rows or/and the order
of the columns or/and the combination of them
i will give an example what i want
1 -1 1 1 1 1 1 1
-1 -1 -1 -1 -1 -1 -1 -1
1 1 1 1 1 -1 1 1
these 2 matrices are iden
I imagine mind_read() easy to implement with Robin Hankin's emulator
package -- under some weak assumptions about the user; mind_write(),
however, seems more involved and might require investing in new
hardware.
Best,
baptiste
On 21 May 2011 12:04, Rolf Turner wrote:
>
> On reflection, it seems
On reflection, it seems to me that what we really need here
is Prof. Ripley's mind_read() function that was foreshadowed
some years ago (see fortune("mind_read")) so that R could
determine just *which* lm() (for example) function the user
has in mind when he or she types ``lm(...)'' at the keyboa
ntermountain Healthcare
greg.s...@imail.org
801.408.8111
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of Rolf Turner
> Sent: Friday, May 20, 2011 1:29 AM
> To: Jari Oksanen
> Cc: r-h...@stat.math.ethz.ch
> Subj
Thanks for the info.
I think I've tried that a while ago, but IIRCC, the problem was always
that R won't let me create on object that would pass as a full grown
NAMESPACE object.
> foo <- function(x) print(x)
> assignInNamespace(x="foo", value=foo, ns="testNS")
Fehler in loadNamespace(name) :
On Fri, May 20, 2011 at 9:16 AM, Janko Thyson
wrote:
> Yet, IMHO there will be more and more problems regarding this in the
> future as the number of contributed packages keeps growing. I personally
> would not mind at all to get used to typing 'thePackage::foo()' *all*
> the time, or at least ha
Hi,
I encounter similar problems as well and posted a while ago about this.
Namespaces are cool, but isn't it very much up to a package's position
in the search path (which is quite arbitrary depending on the packages
loaded) that determines which namespace "dominates"? That leaves it to
the u
My understanding (which is pretty shaky when it comes to namespaces) is
that if you have things set up correctly then namespaces will make sure
that function calls within functions in the given package will be to be to
functions in that package and not to their doppelgangers in other packages
whi
Duncan Murdoch gmail.com> writes:
>
> On 18/05/2011 10:02 PM, Nick Matzke wrote:
> > Hi,
> >
> > If I load 2 packages that have a function with the same
> > name, how do I tell R to run one or the other?
> >
>
> If you are using a package without a namespace, expect problems. Having
> the na
On 18/05/2011 10:02 PM, Nick Matzke wrote:
Hi,
If I load 2 packages that have a function with the same
name, how do I tell R to run one or the other?
(Instead of having R automatically use the first- or
last-loaded one, whichever it is. (Which is it, by the way.))
Cheers!
Nick
It is the m
Thanks!!
Nick
On 5/18/11 7:06 PM, Ista Zahn wrote:
Hi Nick,
See ?"::"
Best,
Ista
On Wed, May 18, 2011 at 10:02 PM, Nick Matzke wrote:
Hi,
If I load 2 packages that have a function with the same name, how do I tell
R to run one or the other?
(Instead of having R automatically use the first-
Hi Nick,
See ?"::"
Best,
Ista
On Wed, May 18, 2011 at 10:02 PM, Nick Matzke wrote:
> Hi,
>
> If I load 2 packages that have a function with the same name, how do I tell
> R to run one or the other?
>
> (Instead of having R automatically use the first- or last-loaded one,
> whichever it is. (Whi
Is it not something like?
package1::myfunction
package2::myfunction
On Wednesday, May 18, 2011 at 9:02 PM, Nick Matzke wrote:
> Hi,
>
> If I load 2 packages that have a function with the same
> name, how do I tell R to run one or the other?
>
> (Instead of having R automatically use the first
Hi,
If I load 2 packages that have a function with the same
name, how do I tell R to run one or the other?
(Instead of having R automatically use the first- or
last-loaded one, whichever it is. (Which is it, by the way.))
Cheers!
Nick
--
==
G'day Maja,
On Thu, 10 Mar 2011 11:44:28 -0800 (PST)
maiya wrote:
> Aaah, it truly is wonderful, this technology!
> I guess I'm going to have to override it a bit though..
> Along the lines of
>
> tae <- ifesle(all.equal(obs, exp) == TRUE, 0, sum(abs(obs - exp)))
Please read the help page on
Quite fascinating, if annoying. Nice example Petr!
Turns out my expected values are causing even more trouble because of this!
I've even gotten negative chi square values (calculated using Cressie and
Read's formula)!
So instead of kludging the error measurement code, I think I'm going to have
t
Aaah, it truly is wonderful, this technology!
I guess I'm going to have to override it a bit though..
Along the lines of
tae <- ifesle(all.equal(obs, exp) == TRUE, 0, sum(abs(obs - exp)))
Do I like doing this? No. But short of reading the vast literature that
exists on calculation precision - wh
On Thu, Mar 10, 2011 at 10:34:21AM -0800, maiya wrote:
> Thanks Josh and Dan!
>
> I did figure it had something to do with the machine epsilon...
>
> But so what do I do now? I'm calculating the total absolute error over
> thousands of tables e.g.:
> tae<-sum(abs(obs-exp))
> Is there any easy way
elp-bounces@r-
> project.org] On Behalf Of maiya
> Sent: Thursday, March 10, 2011 10:34 AM
> To: r-help@r-project.org
> Subject: Re: [R] identical values not so identical? newbie help please!
>
> Thanks Josh and Dan!
>
> I did figure it had something to do with the machine
The function all.equal also might be helpful.
See the help page.
>help(all.equal)
-David Johnston
--
View this message in context:
http://r.789695.n4.nabble.com/identical-values-not-so-identical-newbie-help-please-tp3346078p3346581.html
Sent from the R help mailing list archive at Nabble.com.
On Thu, Mar 10, 2011 at 10:34 AM, maiya wrote:
> Thanks Josh and Dan!
>
> I did figure it had something to do with the machine epsilon...
>
> But so what do I do now? I'm calculating the total absolute error over
> thousands of tables e.g.:
> tae<-sum(abs(obs-exp))
> Is there any easy way to I kee
Thanks Josh and Dan!
I did figure it had something to do with the machine epsilon...
But so what do I do now? I'm calculating the total absolute error over
thousands of tables e.g.:
tae<-sum(abs(obs-exp))
Is there any easy way to I keep these ignorable errors from showing up?
And furthermore, wh
Hi Maja,
Values that are theoretically the same may not be exactly identical
when using floating point arithmetic. Please read this FAQ page:
http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f
If you need to test that they are "equal", you may add
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of maiya
> Sent: Thursday, March 10, 2011 7:19 AM
> To: r-help@r-project.org
> Subject: [R] identical values not so identical? newbie help please!
>
> Hi
Hi there!
I'm not sure I can create a minimal example of my problem, so I'm linking to
a minimal .RData file that has only two objects: obs and exp, each is a 6x9
matrix. http://dl.dropbox.com/u/10364753/test.RData link to dropbox file
(I hope this is acceptable mailing list etiquette!)
Here's
> a
> a b
> 2 10011048 L
> 4 10011048 R
> 6 10011049 L
> 8 10011049 R
> > b
> a b
> 1 10011048 L
> 3 10011048 R
> 5 10011049 L
> 7 10011049 R
>
> > identical(a,b)
> [1] FALSE
>
> some information about the attributes of the 2 data frames
t; identical(a,b)
[1] TRUE
Regards,
Wu
array chip wrote:
>
>> a
> a b
> 2 10011048 L
> 4 10011048 R
> 6 10011049 L
> 8 10011049 R
>> b
> a b
> 1 10011048 L
> 3 10011048 R
> 5 10011049 L
> 7 10011049 R
>
>> identical(a,b)
>
Oops, I overlooked the row names. Sorry for my carelessness.
Thanks
- Original Message
From: Erik Iverson
To: array chip
Cc: r-h...@stat.math.ethz.ch
Sent: Mon, August 16, 2010 2:53:37 PM
Subject: Re: [R] identical()
Hello,
array chip wrote:
> Hi, I am really puzzled by t
rns FALSE.
>
>> a
> a b
> 2 10011048 L
> 4 10011048 R
> 6 10011049 L
> 8 10011049 R
>> b
> a b
> 1 10011048 L
> 3 10011048 R
> 5 10011049 L
> 7 10011049 R
>
>> identical(a,b)
> [1] FALSE
>
> some information about the attribu
048 R
6 10011049 L
8 10011049 R
b
a b
1 10011048 L
3 10011048 R
5 10011049 L
7 10011049 R
identical(a,b)
[1] FALSE
Do these really look "exactly the same" to you?
The first column (the row.names) are clearly different, thus they are
not identical.
See ?row.names
some in
49 R
> b
a b
1 10011048 L
3 10011048 R
5 10011049 L
7 10011049 R
> identical(a,b)
[1] FALSE
some information about the attributes of the 2 data frames:
> class(a)
[1] "data.frame"
> class(b)
[1] "data.frame"
> class(a$a)
[1] "integer"
>
Thanks for your suggestions. A couple of useful functions in there I haven't
heard of before.
--
View this message in context:
http://n4.nabble.com/identical-mystery-tp1573269p1574379.html
Sent from the R help mailing list archive at Nabble.com.
__
R-
Duncan Murdoch wrote:
Dario Strbenac wrote:
Hello,
I have 2 vectors of the same mode and the same contents but I still get FALSE.
Any ideas ?
reference <- c(11, 14, 16, 5, 4, 2, 0, 15, 9, 0)
reference
[1] 11 14 16 5 4 2 0 15 9 0
cpgDensity
If you use 'dput' you could provide a reproducible example, plus it
would probably explain what was happening.
On Mon, Mar 1, 2010 at 1:24 AM, Dario Strbenac wrote:
> Hello,
>
> I have 2 vectors of the same mode and the same contents but I still get
> FALSE. Any ideas ?
>
>> reference <- c(11, 1
Dario Strbenac wrote:
Hello,
I have 2 vectors of the same mode and the same contents but I still get FALSE.
Any ideas ?
reference <- c(11, 14, 16, 5, 4, 2, 0, 15, 9, 0)
reference
[1] 11 14 16 5 4 2 0 15 9 0
cpgDensity
[1] 11 14 16 5 4 2 0 15 9 0
identical
ence,cpgDensity)
[1] FALSE
regards
Søren
Fra: r-help-boun...@r-project.org [r-help-boun...@r-project.org] På vegne
af Dario Strbenac [d.strbe...@garvan.org.au]
Sendt: 1. marts 2010 07:24
Til: r-help@r-project.org
Emne: [R] identical() mystery
Hello,
I have 2 vectors of the sa
Hello,
I have 2 vectors of the same mode and the same contents but I still get FALSE.
Any ideas ?
> reference <- c(11, 14, 16, 5, 4, 2, 0, 15, 9, 0)
> reference
[1] 11 14 16 5 4 2 0 15 9 0
> cpgDensity
[1] 11 14 16 5 4 2 0 15 9 0
> identical(cpgDensity, reference)
[1] FALSE
> mode
Corrado
> Cc: r-help@r-project.org; gavin.simp...@ucl.ac.uk
> Subject: Re: [R] identical(length(x), 1) returns FALSE, but
> print(length(x)) is 1, length(x)==1 is TRUE, and
> is.integer(lenght(x)) is TRUE
>
> On Tue, 15 Sep 2009, Corrado wrote:
>
> > On Tuesday 15 Septemb
On Tue, 2009-09-15 at 18:04 +0100, Corrado wrote:
> On Tuesday 15 September 2009 17:28:02 Gavin Simpson wrote:
> > [note you don't give us your x so I'm making this up - This is what
> > Duncan was going on about in an earlier thread, give us something we can
> > just paste into R and it works]
>
Corrado writes:
> I do not understand what more information! Take any vector of length 1,
for
> example x<-1. Plus all the command that where in my previous email
>
> What is the logic behind
>
> identical(length(x),1)
>
> being false?
identical() returns FALSE because they are not iden
On Sep 15, 2009, at 1:04 PM, Corrado wrote:
On Tuesday 15 September 2009 17:28:02 Gavin Simpson wrote:
[note you don't give us your x so I'm making this up - This is what
Duncan was going on about in an earlier thread, give us something
we can
just paste into R and it works]
Dear Gavin,
On Tue, 15 Sep 2009, Corrado wrote:
On Tuesday 15 September 2009 17:28:02 Gavin Simpson wrote:
[note you don't give us your x so I'm making this up - This is what
Duncan was going on about in an earlier thread, give us something we can
just paste into R and it works]
Dear Gavin,
I do not und
On Tuesday 15 September 2009 17:28:02 Gavin Simpson wrote:
> [note you don't give us your x so I'm making this up - This is what
> Duncan was going on about in an earlier thread, give us something we can
> just paste into R and it works]
Dear Gavin,
I do not understand what more information! Take
On Tue, 2009-09-15 at 17:28 +0100, Gavin Simpson wrote:
> On Tue, 2009-09-15 at 17:16 +0100, Corrado wrote:
> > Dear R,
>
> Are you really looking for all.equal()?
>
> > isTRUE(all.equal(length(x), 1))
> [1] TRUE
Please ignore that bit of rubbish above, clearly that is not what is
required or w
On Tue, 2009-09-15 at 12:22 -0400, Steve Lianoglou wrote:
> Hi,
> I guess the lesson learned is that:
>
> identical() != ==
Indeed, and ?identical explains some of the motivation behind the
function identical and the examples of said help page include the
problem the OP faced... now where was t
On Tue, 2009-09-15 at 17:16 +0100, Corrado wrote:
> Dear R,
>
> the condition:
>
> identical(length(x),1) returns FALSE
>
> but
>
> print(length(x))
>
> returns 1 and:
>
> is.vector(x) is TRUE.
> is.integer(length(x)) is TRUE
> length(x) ==1 is TRUE
>
> I am puzzled.
The key is noticing t
Hi,
On Sep 15, 2009, at 12:16 PM, Corrado wrote:
Dear R,
the condition:
identical(length(x),1) returns FALSE
but
print(length(x))
returns 1 and:
is.vector(x) is TRUE.
is.integer(length(x)) is TRUE
length(x) ==1 is TRUE
I am puzzled.
But is.integer(1) is FALSE
and identical(length(x)
Corrado wrote:
Dear R,
the condition:
identical(length(x),1) returns FALSE
but
print(length(x))
returns 1 and:
is.vector(x) is TRUE.
is.integer(length(x)) is TRUE
length(x) ==1 is TRUE
I am puzzled.
Regards
> is.integer(length(x))
[1] TRUE
> is.integer(1)
[1] FALSE
Hence:
> iden
Dear R,
the condition:
identical(length(x),1) returns FALSE
but
print(length(x))
returns 1 and:
is.vector(x) is TRUE.
is.integer(length(x)) is TRUE
length(x) ==1 is TRUE
I am puzzled.
Regards
--
Corrado Topi
Global Climate Change & Biodiversity Indicators
Area 18,Department of Biology
U
On 4/16/08, Andreas Krause <[EMAIL PROTECTED]> wrote:
>
> Using xyplot, I am plotting observed versus predicted values conditional to
> the values of a third variable.
> I would thus like to have an aspect ratio of 1 and the same axis range.
> Since the range of the values differs substantially
Using xyplot, I am plotting observed versus predicted values conditional to the
values of a third variable.
I would thus like to have an aspect ratio of 1 and the same axis range.
Since the range of the values differs substantially between panels, the axis
ranges shall be different for each pane
58 matches
Mail list logo