erwann rogard | 1 Nov 02:04 2008
Picon

trellis: conditional statements within a panel function

hello,

what i'm trying to achieve is shown in the comment (# ...) below, which is
surely very wrong, but probably intuitively more meaningful that i can
provide in words.

xyplot(y~x2|x1+which,data=make.groups(
  "a"=data.a,
  "b"=data.b,
  "c"=data.c
 ),
 panel=function(...){
  panel.abline(a=0,b=0)
  panel.points(...)
  # if(x1==0 & which=="a") panel.abline(...)
 },
 layout=c(2,3),
 pch=20,
 ylim=c(-10,10),
 xlab="x2",
 cex=0.5
)

thank!

	[[alternative HTML version deleted]]

______________________________________________
R-help <at> r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
(Continue reading)

Yihui Xie | 1 Nov 02:39 2008
Picon

Re: Error Running TinnR with R

In the 'etc' directory of your installation path, e.g. C:\Program Files\R\etc

Regards,
Yihui
--
Yihui Xie <xieyihui <at> gmail.com>
Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086
Mobile: +86-15810805877
Homepage: http://www.yihui.name
School of Statistics, Room 1037, Mingde Main Building,
Renmin University of China, Beijing, 100872, China

On Sat, Nov 1, 2008 at 9:36 AM,  <rkevinburton <at> charter.net> wrote:
> I am sorry to be so slow but where do I find Rprofile.site?
>
> Thank you.
>
> Kevin
>
> ---- Yihui Xie <xieyihui <at> gmail.com> wrote:
>> Currently there are some problems with the building of Hmisc binary
>> package; see CRAN for more information.
>>
>> My suggestion is you can remove (or comment out) the code lines not to
>> use Hmisc for Tinn-R until it's available again on CRAN. As for me, I
>> merely use two expressions in Rprofile.site and I have removed all the
>> other code, as I don't need other functions of Tinn-R:
>>
>> options(pager="internal")
>> .trPaths = c(
(Continue reading)

Deepayan Sarkar | 1 Nov 03:06 2008
Picon

Re: trellis: conditional statements within a panel function

On 10/31/08, erwann rogard <erwann.rogard <at> gmail.com> wrote:
> hello,
>
>  what i'm trying to achieve is shown in the comment (# ...) below, which is
>  surely very wrong, but probably intuitively more meaningful that i can
>  provide in words.
>
>  xyplot(y~x2|x1+which,data=make.groups(
>   "a"=data.a,
>   "b"=data.b,
>   "c"=data.c
>   ),
>   panel=function(...){
>   panel.abline(a=0,b=0)
>   panel.points(...)
>   # if(x1==0 & which=="a") panel.abline(...)
>   },
>   layout=c(2,3),
>   pch=20,
>   ylim=c(-10,10),
>   xlab="x2",
>   cex=0.5
>  )

Check ?which.packet.

-Deepayan

______________________________________________
R-help <at> r-project.org mailing list
(Continue reading)

German Urrus | 1 Nov 03:06 2008
Picon

Help about the plot funtion

 
Hello, my name is German, I am from Argentina, and we are working at university with R. This
work is about sounds and how they affect out ears, we are using R to analice different recordings
of sounds and we need to get the intensity of this recordings in dB.  In order to get the intensity of
the sounds, we are using the plot function, but we can not figure out what is the menaning of the
graphic that we are getting, actually the values it takes are between -1 and 1. 
It would be very helpfull for us to now what this values are, and where we can get more information about the
plot function, besides all the information that is in the help documentation. (we already have read it,
and we could not find any help)
Thanks for helping us
Best regards
Germán.

      Yahoo! Cocina
Recetas prácticas y comida saludable
http://ar.mujer.yahoo.com/cocina/
	[[alternative HTML version deleted]]

______________________________________________
R-help <at> r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Gabor Grothendieck | 1 Nov 03:28 2008
Picon

Re: Help about the plot funtion

Try:

?locator

On Fri, Oct 31, 2008 at 10:06 PM, German Urrus <germanurrus <at> yahoo.com.ar> wrote:
> Â
> Hello, my name is German, I am from Argentina, and we are working at university with R. This work is
about sounds and how they affect out ears, we are using R to analice different recordings of sounds and
we need to get the intensity of this recordings in dB.  In order to get the intensity of the sounds, weÂ
are using the plot function, but we can not figure out what is the menaning of the graphic that we are
getting, actually the values it takes are between -1 and 1.Â
> It would be very helpfull for us to now what this values are, and where we can get more information about the
plot function, besides all the information that is in the help documentation. (we already have read it,
and we could not find any help)
> Thanks for helping us
> Best regards
> Germán.
>
>
>      Yahoo! Cocina
> Recetas prácticas y comida saludable
> http://ar.mujer.yahoo.com/cocina/
>        [[alternative HTML version deleted]]
>
>
> ______________________________________________
> R-help <at> r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
(Continue reading)

David Winsemius | 1 Nov 03:51 2008
Picon
Picon

Re: count data with some conditions

Do you want the count of remaining  elements which are strictly  
greater than the first element?

 > length(which(a[1] < a[2:10]))
[1] 4

or perhaps a bit more deviously:

 > sum( a[1]<a[2:10]+0 ) #adding 0 to TRUE or FALSE creates 1 or 0.
[1] 4

--

-- 
David Winsemius, MD
Heritage Labs.

On Oct 31, 2008, at 7:56 PM, sandsky wrote:

>
> Hi there,
>
> I have a data set:
>
> a=cbind(5,2,4,7,8,3,4,11,1,20)
>
> I want to count # of data, satistfying a[1]<a[2:10].
>
> Anyone helps me solving this case?
>
> Thank you in advance,
>
(Continue reading)

David Winsemius | 1 Nov 04:28 2008
Picon
Picon

Re: getting the p-value from lm as a list object


In your example, you could have noted that summary had an element  
named coefficients which was a 2 x 4 object, with names "(Intercept)"  
and "x". Although you could have asked for the values with  
coefficients[2,4], the use of names makes the intent more clear.

snipped from the str(summary(fm)) output:
$ coefficients : num [1:2, 1:4] 1.067 0.588 1.520 0.245 0.702 ...
   ..- attr(*, "dimnames")=List of 2
   .. ..$ : chr [1:2] "(Intercept)" "x"
   .. ..$ : chr [1:4] "Estimate" "Std. Error" "t value" "Pr(>|t|)"

So ...

 > summary(fm)$coefficients
              Estimate Std. Error   t value   Pr(>|t|)
(Intercept) 1.0666667  1.5196358 0.7019226 0.50263396
x           0.5878788  0.2449115 2.4003725 0.04315164

 > summary(fm)$coefficients["x","Pr(>|t|)"]
[1] 0.04315164

--

-- 
David Winsemius, MD
Heritage Labs

On Oct 31, 2008, at 11:59 AM, eric lee wrote:

> Hi,
>
(Continue reading)

RON70 | 1 Nov 08:12 2008
Picon

How R calculate p-value ?


I am wondering how R calculate p-value for a test. Does R do some
"Approximate" integration on the p.d.f of null distribution? How I can see
the code for this particular calculation?

Your help will be highly appreciated.

Regards,
--

-- 
View this message in context: http://www.nabble.com/How-R-calculate-p-value---tp20278048p20278048.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help <at> r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Ted.Harding | 1 Nov 08:30 2008
Picon

Re: count data with some conditions

On 01-Nov-08 02:51:37, David Winsemius wrote:
> Do you want the count of remaining  elements which are strictly  
> greater than the first element?
> 
>  > length(which(a[1] < a[2:10]))
> [1] 4
> 
> or perhaps a bit more deviously:
> 
>  > sum( a[1]<a[2:10]+0 ) #adding 0 to TRUE or FALSE creates 1 or 0.
> [1] 4

No need to be devious! Simply
  sum(a[1] < a[2:10])
# [1] 4
will do it. The reason is that when TRUE or FALSE are involved in
an arithmetic operation (which sum() is), they are cast into 1 or 0.

Ted.

> On Oct 31, 2008, at 7:56 PM, sandsky wrote:
>> Hi there,
>> I have a data set:
>>
>> a=cbind(5,2,4,7,8,3,4,11,1,20)
>>
>> I want to count # of data, satistfying a[1]<a[2:10].
>> Anyone helps me solving this case?
>>
>> Thank you in advance,
(Continue reading)

sandsky | 1 Nov 06:50 2008
Picon

Re: count data with some conditions


David,

Yes, it is what I want. It is a great help. Thank you,

Jin

David Winsemius wrote:
> 
> Do you want the count of remaining  elements which are strictly  
> greater than the first element?
> 
>  > length(which(a[1] < a[2:10]))
> [1] 4
> 
> or perhaps a bit more deviously:
> 
>  > sum( a[1]<a[2:10]+0 ) #adding 0 to TRUE or FALSE creates 1 or 0.
> [1] 4
> 
> -- 
> David Winsemius, MD
> Heritage Labs.
> 
> On Oct 31, 2008, at 7:56 PM, sandsky wrote:
> 
>>
>> Hi there,
>>
>> I have a data set:
(Continue reading)


Gmane