Deepayan Sarkar | 1 Nov 2007 01:53
Picon

Re: Lattice: par.ylab.text alpha ?

On 10/31/07, Folkes, Michael <FolkesM <at> pac.dfo-mpo.gc.ca> wrote:
> Hi all,
> I've got R for windows 2.3.1
> I'm trying to modify my lattice histograms.
> The following does reset the y-label to blue, but I cannot turn off the label (alpha=0), nor shift label
position (I'm assuming that is what lineheight is for).  Is 'lineheight' the equivalent of 'line' in mtext?
> Am I erring somehow?

AFAIK, lineheight only applies to multiline labels (it gets forwarded
to grid). It does have an effect for such labels.

The alpha thing is a bug, specifically, a bug in
lattice:::getLabelList, which forgets to look at alpha. For your use,
a temporary fix is to use col="transparent".

-Deepayan

______________________________________________
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.

ecatchpole | 1 Nov 2007 04:48
Picon

Re: R GUI for Linux

This is a known problem with Suse10.3 --- lots of things that use Java 
(e.g., Matlab) produce the same error message.  I'm currently trying to 
fix this upon my machine, but haven't succeeded yet.  Josh Triplett 
(http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6532373) suggested 
the following:

---begin---
I worked with jcristau and christoph4 via IRC on #debian-x, and we 
managed to
track down the problem with broken locking in Sun Java 1.5 and 1.6.  It only
occurs if Java finds the Xinerama extension, at which point it does 
something
broken with locking and triggers the assertion.  If Java never finds the
Xinerama extension, it doesn't trigger the assertion for broken locking.

The following workarounds address this problem:

For sun-java5-bin:
sed -i 's/XINERAMA/FAKEEXTN/g' 
/usr/lib/jvm/java-1.5.0-sun-1.5.0.11/jre/lib/i386/xawt/libmawt.so
---end---

You need to modify the path for your jre.  This seems to have helped 
several people.  But it didn't work for me.

A sure fix is going back to Suse10.2!  :(

Ted.

--

-- 
(Continue reading)

Sancar Adali | 1 Nov 2007 06:11
Picon

RWeka and naiveBayes

Hi
I'm trying to use RWeka to use a NaiveBayes Classifier(the Weka
version). However it crashes whenever there is a NA in the class
Gender

Here is the.code I have with d2 as the data frame.
The first call to NB doesn't make R crash but the second call does.

NB <- make_Weka_classifier("weka/classifiers/bayes/NaiveBayesSimple")

d2[,64]<-d2$Gender=="M"
NB(Gender~age,d2,na.action=na.exclude)   #1st call

d2$Gender[d2$Gender==""]<-NA

valid.set<-(!is.na(d2$Gender)&(!is.na(d2$age)))
NB(formula=Gender~age,data=d2[valid.set,],subset=valid.set,na.action=na.exclude)

Anybody have an idea how to fix this. or a very detailed explanation
of how to use "naiveBayes" function from e1071 package? I tried using
this function , too. However I can't figure out what the returning
error means?

naiveBayes(formula=Gender~age,data=d2[valid.set,],subset=valid.set,na.action=na.exclude)

I get the following error
Error in tapply(var, y, mean, na.rm = TRUE) :
        arguments must have same length

Thanks
(Continue reading)

Shibu John | 1 Nov 2007 06:45
Picon

Help me in Cochran armitage trend test Coding

Dear sir,

I am Shibu John from Thrombosis Research Institute India. It is a
multidisciplinary organisation concerned with the interrelated problems of
thrombosis and atherosclerosis.

I was searching for Cochran armitage trend test program in R. Then I had
seen your R coding for C-A trend test.  I tried that in the R software.
But I can’t run the program due the [Error: could not find function
"independence_test"]. Where is the declaration of this function?

I was trying the trend test for Genotype frequency in Cases and controls.
So I would like to know how to do the Monte carlo simulation test with
Cochran armitage trend test.

Sir can you please help me to solve the problem.

Here I copied the codes from R

> library("coin")
Loading required package: survival
Loading required package: splines
Loading required package: mvtnorm
Error: package 'modeltools' required by 'coin' could not be found
In addition: Warning messages:
1: package 'coin' was built under R version 2.6.0
2: package 'survival' was built under R version 2.5.1
3: package 'mvtnorm' was built under R version 2.5.1
> lungtumor <- data.frame(dose = rep(c(0, 1, 2), c(40, 50, 48)),
+ tumor = c(rep(c(0, 1), c(38, 2)),
(Continue reading)

Deepayan Sarkar | 1 Nov 2007 06:57
Picon

Re: Lattice: par.ylab.text alpha ?

On 11/1/07, Folkes, Michael <FolkesM <at> pac.dfo-mpo.gc.ca> wrote:
>
>
>
> wohoo!  A bug.  I know I wasn't the first to find it, but I had a hunch this
> time that it was going to be a bug and not just my poor understanding.  I
> wasn't really thinking as just ylab="" works fine too.  I think I was hoping
> to squeeze it (the ylab) closer to the axis w/o axis labels.

There's nothing specially meant for ylab, but you can supply a factor
for all layout widths and heights; e.g., compare

xyplot(1 ~ 1, ylab = "foo", par.settings = list(layout.widths = list(ylab = 2)))
xyplot(1 ~ 1, ylab = "foo", par.settings = list(layout.widths = list(ylab = 0)))

> Now that we're on topic.  If I turn off the axes lines using alpha, is there
> a way to turn on just axis 1/2/3/4?

Not sure exactly what you mean, but try variants of

xyplot(1 ~ 1, scales = list(alternating = 0/1/2/3, tck = 0/1))

-Deepayan

______________________________________________
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)

Prof Brian Ripley | 1 Nov 2007 07:03
Picon
Picon
Favicon

Re: high RAM on Linux or Solaris platform

On Wed, 31 Oct 2007, David Bickel wrote:

> Dr. Lumley and Prof. Ripley,
>
> Thank you very much for your helpful responses.
>
> Have you found any particular distribution of Linux to work well with
> 64-bit R? For the cluster, I am currently considering Debian (since it
> seems popular) and SUSE (since Matlab runs on it), but I remain open to
> others.

These days I think there is no difference.  (SuSE did much of the 
development for x86_64 Linux, and Debian was one of the later ones to 
support it.  But that's going back ca 4 years.)

Commercial products normally only support commercial distributions of 
Linux, but Matlab does run on many others.

I would find the overriding consideration to be the availability of local 
support.

>
> Best regards,
> David
>
>
> -----Original Message-----
> From: Prof Brian Ripley [mailto:ripley <at> stats.ox.ac.uk]
> Sent: Tuesday, October 30, 2007 4:51 PM
> To: Thomas Lumley
(Continue reading)

John Field | 1 Nov 2007 07:25
Picon
Picon

Updating packages

I've just updated from R-2.5.1 to R-2.6.0, under Windows XP.  Is 
there a simple way to reload into R-2.6.0 all the packages I had 
loaded under R-2.5.1?
Thanks,
John
=========================
John Field Consulting Pty Ltd
10 High Street, Burnside SA 5066 Australia
Phone +61 8 8332 5294 or +61 409 097 586
Fax   +61 8 8332 1229
Email  JohnField <at> ozemail.com.au

______________________________________________
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.

Garth.Warren | 1 Nov 2007 07:33
Picon
Picon
Favicon

loops & sampling

Hi,

I'm new to R (and statistics) and my boss has thrown me in the deep-end with the following task: 

We want to evaluate the impact that sampling size has on our ability to create a robust model, or evaluate how
robust the model is to sample size for the purpose of cross-validation i.e. in our current project we have
collected a series of independent data at 250 locations, from which we have built a predictive model, we
want to know whether we could get away with collecting fewer samples and still build a decent model; for the
obvious operational reasons of cost, time spent in the field etc.. 

Our thinking was that we could apply a bootstrap type procedure:

We would remove 10 records or samples from the total n=250 and then replace those 10 removed with
replacements (or copies) from the remaining 240. With this new data-frame we would apply our model and
calculate an r², we would then repeat through looping 1000 times before generating the mean r² from
those 1000 r² values generated. After which we would start the process again by remove 20 samples from our
data with replacements from the remaining 230 records and so on... 

Below is a simplified version of the real code which contains most of the basic elements. My main problem is
I'm not sure what the 'for(i in 1:nboot)' line is doing, originally I though what this meant was that it
removed 1 sample or record from the data which was replaced by a copy of one of the records from the remaining
n, such that 'for(i in 10:nboot)' when used in the context of the below code removed 10 samples with
replacements as I have said above. I'm almost positive that this isn't happening and if not how can I make
the code below for example do what we want it to? 

library(utils)

#data

a <- c(5.5, 2.3, 8.5, 9.1, 8.6, 5.1)
(Continue reading)

Henric Nilsson (Public | 1 Nov 2007 07:42
Picon

Re: Help me in Cochran armitage trend test Coding


Shibu John wrote:
> Dear sir,
> 
> I am Shibu John from Thrombosis Research Institute India. It is a
> multidisciplinary organisation concerned with the interrelated problems of
> thrombosis and atherosclerosis.
> 
> I was searching for Cochran armitage trend test program in R. Then I had
> seen your R coding for C-A trend test.  I tried that in the R software.
> But I can’t run the program due the [Error: could not find function
> "independence_test"]. Where is the declaration of this function?

In the `coin' package.

> 
> I was trying the trend test for Genotype frequency in Cases and controls.
> So I would like to know how to do the Monte carlo simulation test with
> Cochran armitage trend test.
> 
> Sir can you please help me to solve the problem.
> 
> 
> 
> Here I copied the codes from R
> 
>> library("coin")
> Loading required package: survival
> Loading required package: splines
> Loading required package: mvtnorm
(Continue reading)

Andreas Nord | 1 Nov 2007 08:17
Picon
Picon

F distribution from lme()?


Dear all,

Using the data set and code below, I am interested in modelling how egg
temperature (egg.temp)
is related to energy expenditure (kjday) and clutch size (treat) in
incubating birds using the
lme-function. I wish to generate the F-distribution for my model, and have
tried to do so using
the anova()-function. However, in the resulting anova-table, the parameter
kjday has gone from
being highly non-signiicant in the lme-expression, to all of a sudden being
significant at the
0.05 level. At the same time, "treat" retains its original p-value. I've
tried to understand why,
but can't really figure it out. So, what has happened and why? How to best
interpret it?

Further, any advice on how to best generate F-distributions from the
lme-function is most appreciated.

Many thanks in advance,
Andreas Nord
Sweden

  ind treat egg.temp  kjday
   79     2 27.33241 42.048
   42     2 30.73269 41.760
   10     2 29.54986 38.304
  206     2 31.78947 45.216
(Continue reading)


Gmane