Re: [R] newbie's additional (probably to some extent OT) questions

2003-11-06 Thread JB
At 07.11.2003 (00:24), Thomas W Blackwell wrote:
JB and Michael  -

But I will guess that the
data come from a high school physics experiment on gravitational
acceleration which drops a weight dragging a paper tape through
a buzzer with a piece of carbon paper in it.  This prints periodic
marks on the paper tape.  The data  x  are the distances traveled
at successive time points following time zero.
No. It is a body (slider?) that is sliding down an inclined plane on an air 
cushion. we can determine the position of the slider pretty exactly (the 
error should be less than 0.01m). The clock starts when we release the body 
and it stops when the body passes a photo cell.

There are two data sets as we experimented with two different angles 
between plane table. The measurement of the angles is probably a bit less 
exact than the measurement of the position.

Here are the two data sets:
The positions are in the dx-list and are the same in both experiments:
dx-list = c( 1.60, 1.55,1.50,...,0.70) (19 values).
The corresponding dt-lists are
dt-list1 = 
c(6.44,6.29,6.1,6.09,6.02,5.87,5.68,5.65,5.52,5.43,5.30,5.20,5.01,4.88,4.74,4.61,4.44,4.36,4.12)

dt-list2 = 
c(3.98,3.86,3.78,3.72,3.65,3.59,3.51,3.45,3.37,3.28,3.22,3.14,3.07,2.96,2.89,2.81,2.74,2.61,2.55)

During the first series of measurements, tha body bumped against a boundary 
that was fixed on the inclined plane. By bumping against this boundray, the 
inclined plane, that has a much bigger mass than the body, was slightly 
pushed and after 15 measurements the position of this boundary changed by 
0.01m:

A--B---C

Here B should be a fixed position and A should be changed. According to our 
mistake B was changed a bit too. C is a boundary that stops the body from 
leavinf the air cushion (as those sliding bodies are expensive).

Then, when we took the second series of measurements, I "ordered" a pupil 
to stop tha body with his hand before bumping against C. And really, it 
seems to me that the second series is more precise.


I think it's DYNAMITE that you're actually doing this data analysis.
Why? I always do this, but this year I started to involve a bit more 
statistics. I told about how the method of least squares was an "unbiased 
estimate" and that also some hypothesis testing is done (when I check 
whether the points lie on a parabola). The pupils are 16 to 18 years old. 
They have to draw dx against (dt)^2 as their homework and have to fit in a 
straight line. This is the way we do linear regression.

It's what I always wanted to do as a high school student, but didn't
have the technical background then to carry out.  In fact ... come to
think of it ... I'm pretty sure I STILL HAVE my high school ticker
tapes folded up among my high school papers somewhere, 35 years
later, still waiting to be properly analyzed !
From your explanations which follow this point, I do not understand a 
single word (the termini technici are all unknown to me) but I suspect that 
I pretty much would like to understand them. Sigh. Probably, I should have 
to read some work on statistics

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] quadprog

2003-11-06 Thread Jason Nielsen
Hi all,

I'm trying to get quadprog to give me the Lagrange multipliers.  By taking
a look at the Fortran source it appears they are stored in the working
vector 'work'.  However, this working vector is larger than the number of
possible multipliers so I figure it also contains the slack variable etc.  
My problem is figuring out which values in the work array are the
multipliers so I can modify solve.QP.R to output them for me.  Any info
would be greatly appreciated.

Cheers,
Jason

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] Q. About String indexing

2003-11-06 Thread Marc Schwartz
On Thu, 2003-11-06 at 20:24, John Fox wrote:
> Dear Ben and Mark,
> 
> substring and substr are also helpful here.
> 
> John


Quite true. 

As usual, there is usually more than one way to do things. The above
approach, given the C code, would be faster as the source vector and the
offsets of the substring increase in size.

This would become more influential if you want the resultant characters
as a single substring as opposed to a vector of the characters, which my
initial solution would yield.

> unlist(strsplit("testing", ""))[2:5]
[1] "e" "s" "t" "i"

> substr("testing", 2, 5)
[1] "esti"

Thanks John.

Marc

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] XML package

2003-11-06 Thread Dirk Eddelbuettel
On Fri, Nov 07, 2003 at 02:58:38AM +, Sen-Lin Tang wrote:
> Dear Sir/Madam,
> 
> I have tried to install biocoductor package. During the installation, there 
> was an error message showing, there is no XML package available and 
> suggested me to download from the R-project website. Unfortunately I could 
> not find it. Could you give me a hand? Thanks a lot.

Try this for the source package:

http://cran.au.r-project.org/src/contrib/XML_0.95-4.tar.gz

where I substituted .au. for the .us. location I'd use. Binary packages are
in the sibbling directories. 

If you happen to run Debian, thanks to Rafael's packaging work on this:

$ apt-get install r-cran-xml

Hth, Dirk

-- 
Those are my principles, and if you don't like them... well, I have others.
-- Groucho Marx

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] RMySQL for Windows

2003-11-06 Thread Prof Brian Ripley
There are instructions in the source code, and from the ReadMe on the 
Windows area of CRAN:

  RMySQL is available at http://stat.bell-labs.com/RS-DBI/download,
  provided by its maintainer, David A. James.

One caveat: binary versions of RMySQL have proved sensitive to the exact 
version of MySQL installed, so it is better to build from the sources on 
your own machine (if you can).

On 6 Nov 2003, Arend P. van der Veen wrote:

> I have been using RMySQL under linux.  Does anybody know what is
> involved in compiling it for Windows?  There is not a binary version
> available.

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] XML package

2003-11-06 Thread Sen-Lin Tang
Dear Sir/Madam,

I have tried to install biocoductor package. During the installation, there 
was an error message showing, there is no XML package available and 
suggested me to download from the R-project website. Unfortunately I could 
not find it. Could you give me a hand? Thanks a lot.

Cheers,

Sen-Lin




Sen-Lin Tang (Ph.D.)
Postdoctoral Research Fellow
Microbiology Laboratory,
School of Veterinary Science,
The University of Melbourne,
Parkville, Victoria, 3010
Australia
Phone: +61-3-83447368
Email: [EMAIL PROTECTED]
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] Q. About String indexing

2003-11-06 Thread John Fox
Dear Ben and Mark,

substring and substr are also helpful here.

John

At 08:10 PM 11/6/2003 -0600, Marc Schwartz wrote:
On Thu, 2003-11-06 at 19:53, Ben Day wrote:
> Hi all - this is a very basic question: how does one index substrings
> of a character string, for example get the 2nd through 5th characters
> of the string "testing", in the R language? Indexing with square
> brackets seems only to work for vectors, lists, etc., and although
> I've found plenty of functions for concatenating strings, running
> substitutions with regexps and the like, I seem to be at a loss when
> it comes to indexing or selecting substrings.
>
> I'm sure I'm missing something very obvious here, but I ask only after
> having scoured the basic help manuals.
>
> I am not so subscribed to this list, so if any replies could be sent
> directly to me.
>
> Thanks very much,
> -Ben
unlist(strsplit("testing",""))[2:5]
[1] "e" "s" "t" "i"
Use strsplit() to convert the string into a list of characters, where ""
is the separator.
Then use unlist() to convert the list into a vector and index the 2:5
characters.
See ?strsplit and ?unlist

HTH,

Marc Schwartz

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
-
John Fox
Department of Sociology
McMaster University
Hamilton, Ontario, Canada L8S 4M4
email: [EMAIL PROTECTED]
phone: 905-525-9140x23604
web: www.socsci.mcmaster.ca/jfox
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] Q. About String indexing

2003-11-06 Thread Marc Schwartz
On Thu, 2003-11-06 at 19:53, Ben Day wrote:
> Hi all - this is a very basic question: how does one index substrings
> of a character string, for example get the 2nd through 5th characters
> of the string "testing", in the R language? Indexing with square
> brackets seems only to work for vectors, lists, etc., and although
> I've found plenty of functions for concatenating strings, running
> substitutions with regexps and the like, I seem to be at a loss when
> it comes to indexing or selecting substrings.
> 
> I'm sure I'm missing something very obvious here, but I ask only after
> having scoured the basic help manuals.
> 
> I am not so subscribed to this list, so if any replies could be sent
> directly to me.
> 
> Thanks very much,
> -Ben


unlist(strsplit("testing",""))[2:5]
[1] "e" "s" "t" "i"

Use strsplit() to convert the string into a list of characters, where ""
is the separator.

Then use unlist() to convert the list into a vector and index the 2:5
characters.

See ?strsplit and ?unlist

HTH,

Marc Schwartz

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] Q. About String indexing

2003-11-06 Thread Ben Day
Hi all - this is a very basic question: how does one index substrings of a character 
string, for example get the 2nd through 5th characters of the string "testing", in the 
R language? Indexing with square brackets seems only to work for vectors, lists, etc., 
and although I've found plenty of functions for concatenating strings, running 
substitutions with regexps and the like, I seem to be at a loss when it comes to 
indexing or selecting substrings.

I'm sure I'm missing something very obvious here, but I ask only after having scoured 
the basic help manuals.

I am not so subscribed to this list, so if any replies could be sent directly to me.

Thanks very much,
-Ben
-- 
__
Sign-up for your own personalized E-mail at Mail.com


Search Smarter - get the new eXact Search Bar for free!
http://www.exactsearchbar.com/

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


RE: [R] Plotting Andrew's curves?

2003-11-06 Thread Liaw, Andy
Is that the technique for visualizing multivariate data by plotting linear
combinations of sine and cosine curves using the data values as
coefficients?  Seems to be fairly easy to cook up with a few lines of R
code...

Andy

> From: Eryk Wolski [mailto:[EMAIL PROTECTED] 
> 
> Hi!
> Is there a function for plotting Andrew's curves in R?
> /Eryk

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


RE: [R] R input file scanning

2003-11-06 Thread Liaw, Andy
If the portion of the file that you want to read is "rectangular" (same
number of fields in all lines and same type of data in each column), you can
use either read.table() or scan() and supply the skip= argument to skip over
the headers you don't want to read in.

HTH,
Andy

> From: Mathieu Drapeau [mailto:[EMAIL PROTECTED] 
> 
> Hi,
> I would like to know how can I solve my problem...
> I want to load some data (surrounded by a tag) that are 
> stored in a file 
> that contains also some scrap (header and descriptions) that 
> I want to 
> skip. How can I do that?
> 
> Thanks,
> Mathieu
> 
> __
> [EMAIL PROTECTED] mailing list 
> https://www.stat.math.ethz.ch/mailman/listinfo> /r-help
>

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] newbie's additional (probably to some extent OT) questions

2003-11-06 Thread Thomas W Blackwell
JB and Michael  -

I'm coming into this without having reviewed the earlier emails
(if there are any) in this thread.  But I will guess that the
data come from a high school physics experiment on gravitational
acceleration which drops a weight dragging a paper tape through
a buzzer with a piece of carbon paper in it.  This prints periodic
marks on the paper tape.  The data  x  are the distances traveled
at successive time points following time zero.

I think it's DYNAMITE that you're actually doing this data analysis.
It's what I always wanted to do as a high school student, but didn't
have the technical background then to carry out.  In fact ... come to
think of it ... I'm pretty sure I STILL HAVE my high school ticker
tapes folded up among my high school papers somewhere, 35 years
later, still waiting to be properly analyzed !

It makes sense to fit a no-intercept model with no linear term
and only a quadratic term.  The model formula  x ~ 0 + I(t^2)
does this correctly.  (If one wanted to account for friction,
the linear term would come back in.)

Question 1 involves a distinction between the standard deviation
of the residuals and the standard error of an estimate for the
single coefficient in the model.  These are not at all the same
concept.  The coefficient estimate behaves like a sample average,
and has much smaller sampling variation over repeated experiments
than one observation would.  In the no-intercept model, the
standard deviation of the residuals is stated as 0.01945 on 18 df.
In the model WITH an intercept, it is stated as  0.01683 on 17 df.

I don not understand 'MuPad' but I observe an apparent typographical
error in which the second residual standard deviation is reported
instead as  0.006813.  All of these three numbers represent the
residual standard deviation.  Naturally, this is much larger than
the standard error of an estimate:  0.0001487  or  0.0005367.

Question 2 refers to the estimated value for the intercept in a
model with constant and quadratic terms only (no linear term).
The estimated value is  0.043 +- 0.016  (no units are given).
Gosh, I'm not surprised.  The observations and the predictors
are all non-negative.  Linear regression produces an unbiased
estimate, given its assumptions, but when there is uncertainty
in the predictors as well, it is known to be biased downward.
(Think of the "two regression lines".)  If some of that bias
shows up in the intercept, it's no surprise.  If this were a
mission-critical data set, I would certainly plot the residuals
against the fitted values and look for empirical evidence to
judge whether the quadratic-only model is adequate.

HTH  -  tom blackwell  -  u michigan medical school  -  ann arbor  -

On Thu, 6 Nov 2003, JB wrote:

> (1)
> So finally, thank to your help I have this:
>
>   summary(lm(x ~ 0+I(t^2)))
>
> And then I get this result:
> =
> Call:
> lm(formula = x ~ 0 + I(t^2))
>
> Residuals:
> Min 1Q Median 3QMax
> -3.332e-02 -9.362e-03  1.169e-05  1.411e-02  3.459e-02
>
> Coefficients:
>  Estimate Std. Error t value Pr(>|t|)
> I(t^2) 0.0393821  0.0001487   264.8   <2e-16 ***
> ---
> Signif. codes:  0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1
>
> Residual standard error: 0.01945 on 18 degrees of freedom
> Multiple R-Squared: 0.9997, Adjusted R-squared: 0.9997
> F-statistic: 7.014e+04 on 1 and 18 DF,  p-value: < 2.2e-16
> =
>
> I see in MuPad, that Delta^2 is 0.006813. Now is not the standard error the
> square root of Delta^2? Should I not get 0.069 as standard error?
>
> (2)
> When I use the model
> summary(lm(x ~ I(t^2)))
> I get (of course) another result with a slightly smaller Delta^2. But I do
> not expect such an error as this would mean that there was a systematic
> error in our measurement of the distance and if I understand the result of
> R correctly, the error was 0.04m which is impossible:
>
> ==
> Call:
> lm(formula = x ~ I(t^2))
>
> Residuals:
> Min 1Q Median 3QMax
> -0.0202520 -0.0116533 -0.0006036  0.0036699  0.0432987
>
> Coefficients:
>   Estimate Std. Error t value Pr(>|t|)
> (Intercept) 0.0427606  0.0161085   2.655   0.0167 *
> I(t^2)  0.0379989  0.0005367  70.801   <2e-16 ***
> ---
> Signif. codes:  0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1
>
> Residual standard error: 0.01683 on 17 degrees of freedom
> Multiple R-Squared: 0.9966, Adjusted R-squared: 0.9964
> F-statistic:  5013 on 1 and 17 DF,  p-value: < 2.2e-16
> =
>
> What is going on here?
> (Sorry but I am only a high school teacher and have not much idea of
> statistics.)
>
> TIA,
>
> JB
>
> __
> [EMAIL PROTECTED] mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>


[R] Plotting Andrew's curves?

2003-11-06 Thread Eryk Wolski
Hi!
Is there a function for plotting Andrew's curves in R?
/Eryk

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] Flury faces.

2003-11-06 Thread Eryk Wolski
How to plot if possible flury faces in R?
/Eryk

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: R.com domain [was: [R] Lexical scoping]

2003-11-06 Thread Douglas Bates
[EMAIL PROTECTED] writes:

...


Why are you faking a "From:" address of [EMAIL PROTECTED]  There is no such
domain.  Single letter domain names like R.com (and R.net and R.org)
are reserved by the Internet Assigned Numbers Authority (IANA), which
is the reason that our domain is R-project.org and not R.org.

Your message came through a Norwegian university 

Organization Name..: Norges Teknisk-Naturvitenskapelige Universitet
Organization Number: 974767880
Post Address...: Høgskoleringen 1
Postal Code: N-7491
Postal Area: Trondheim
Country: Norway

after the first hop from [EMAIL PROTECTED]

I am replying to the list because I can't reply to your apparent
address.

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] some error messages using arm cpu with Debian

2003-11-06 Thread Dirk Eddelbuettel
On Thu, Nov 06, 2003 at 02:42:55PM -0800, Simon Rex wrote:
> I have a small handheld pc having ARM process as a CPU. I installed debian and 
> installed R using apt-get command. Everything worked great except for drawing even 
> simple graphs
>  
> x <- 1:10
> plot(x)
>  
> I got error messages
>  
> 1: Nonfinite axis limits [GScale(nan,nan,1, .); log=0] 
> 2: relative range of values = 9.0072e+15 * EPS, is small (axis 1). 
> 3: Nonfinite axis limits [GScale(-inf,inf,2, .); log=0] 
> 4: relative range of values = 9.0072e+15 * EPS, is small (axis 2). 
>
> I searched R-help Archives hoping answers to this problem and ran into this message
>  
> *
> 
> Debian tries to build its packages on a variety of platforms. The arm 
> platform compiled 0.90.1 (the last Debian release before the Debian package 
> required an Atlas library, something we no longer require) failed in 'make 
> check'. The log snippet follows; I traced this to the example(Bessel) code. 
>   
> > matplot(nu, t(outer(xx,nu, besselI)), type = 'l', ylim = c(-50,200), 
> + main = expression(paste("Bessel ",I[nu](x)," for fixed ", x, 
> + ", as ",f(nu))), 
> + xlab = expression(nu)) 
> Error in title(main = main, sub = sub, xlab = xlab, ylab = ylab, ...) : 
> Metric information not yet available for this device 
> In addition: Warning messages: 
> 1: Nonfinite axis limits [GScale(nan,nan,1, .); log=0] 
> 2: relative range of values = 9.0072e+15 * EPS, is small (axis 1). 
> 3: Nonfinite axis limits [GScale(-inf,inf,2, .); log=0] 
> 4: relative range of values = 9.0072e+15 * EPS, is small (axis 2). 
> Execution halted 
> 
> Casual inspection suggests that GScale(nan,nan,1, .) is probably 
> incorrect. Now, src/nmath/bessel* provide the Bessel functions but does this 
> reflect a potential libc bug in IEEE handling? 
> 
> I have also asked on the debian-arm mailing list, but no result so far. I 
> have some access to an arm box and could compile small test cases if that 
> helped. 
> 
> Dirk 
> 
> 
> Is there any way I can fix this problem ? I checked Debain FTP sites to find Atlas 
> but there is no Atlas lib for arm. 

Yes, there is no Atlas, and we had a small bug in as much as we depended on
atlas for all arches. That is fixed the most recent versions. Generally,
there are lots of successful builds:

http://buildd.debian.org/build.php?arch=arm&pkg=r-base

However, Peter D looked into this a little, and as I recall, found some FPU
isssues. You should probably get in contact with the Debian arm porters, as
well as r-devel. If you could act as a conduit between arm, R and Debian to
improve this, we would all appreciate this.

Regards, Dirk

-- 
Those are my principles, and if you don't like them... well, I have others.
-- Groucho Marx

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] some error messages using arm cpu with Debian

2003-11-06 Thread Simon Rex
I have a small handheld pc having ARM process as a CPU. I installed debian and 
installed R using apt-get command. Everything worked great except for drawing even 
simple graphs
 
x <- 1:10
plot(x)
 
I got error messages
 
1: Nonfinite axis limits [GScale(nan,nan,1, .); log=0] 
2: relative range of values = 9.0072e+15 * EPS, is small (axis 1). 
3: Nonfinite axis limits [GScale(-inf,inf,2, .); log=0] 
4: relative range of values = 9.0072e+15 * EPS, is small (axis 2). 
   
I searched R-help Archives hoping answers to this problem and ran into this message
 
*

Debian tries to build its packages on a variety of platforms. The arm 
platform compiled 0.90.1 (the last Debian release before the Debian package 
required an Atlas library, something we no longer require) failed in 'make 
check'. The log snippet follows; I traced this to the example(Bessel) code. 
  
> matplot(nu, t(outer(xx,nu, besselI)), type = 'l', ylim = c(-50,200), 
+ main = expression(paste("Bessel ",I[nu](x)," for fixed ", x, 
+ ", as ",f(nu))), 
+ xlab = expression(nu)) 
Error in title(main = main, sub = sub, xlab = xlab, ylab = ylab, ...) : 
Metric information not yet available for this device 
In addition: Warning messages: 
1: Nonfinite axis limits [GScale(nan,nan,1, .); log=0] 
2: relative range of values = 9.0072e+15 * EPS, is small (axis 1). 
3: Nonfinite axis limits [GScale(-inf,inf,2, .); log=0] 
4: relative range of values = 9.0072e+15 * EPS, is small (axis 2). 
Execution halted 

Casual inspection suggests that GScale(nan,nan,1, .) is probably 
incorrect. Now, src/nmath/bessel* provide the Bessel functions but does this 
reflect a potential libc bug in IEEE handling? 

I have also asked on the debian-arm mailing list, but no result so far. I 
have some access to an arm box and could compile small test cases if that 
helped. 

Dirk 


Is there any way I can fix this problem ? I checked Debain FTP sites to find Atlas but 
there is no Atlas lib for arm. 

I will really appreciate any help to fix this problem.

Thanks

Rex




-


[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] R input file scanning

2003-11-06 Thread Roger D. Peng
You can use readLines() on a file connection to read line by line and 
throw out the header stuff.  Once you get to the point where the data 
start, you can use read.table() (or something similar).

-roger

Mathieu Drapeau wrote:

Hi,
I would like to know how can I solve my problem...
I want to load some data (surrounded by a tag) that are stored in a 
file that contains also some scrap (header and descriptions) that I 
want to skip. How can I do that?

Thanks,
Mathieu
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] R input file scanning

2003-11-06 Thread Jason Turner
Mathieu Drapeau wrote:

Hi,
I would like to know how can I solve my problem...
I want to load some data (surrounded by a tag) that are stored in a file 
that contains also some scrap (header and descriptions) that I want to 
skip. How can I do that?

By writing some code to use readLines() or scan().  I'll be more 
specific if you will.  :)

Jason
--
Indigo Industrial Controls Ltd.
http://www.indigoindustrial.co.nz
64-21-343-545
[EMAIL PROTECTED]
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] RMySQL for Windows

2003-11-06 Thread Arend P. van der Veen
Hi,

I have been using RMySQL under linux.  Does anybody know what is
involved in compiling it for Windows?  There is not a binary version
available.

Thanks,
Arend

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] R input file scanning

2003-11-06 Thread Mathieu Drapeau
Hi,
I would like to know how can I solve my problem...
I want to load some data (surrounded by a tag) that are stored in a file 
that contains also some scrap (header and descriptions) that I want to 
skip. How can I do that?

Thanks,
Mathieu
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] newbie's additional (probably to some extent OT) questions

2003-11-06 Thread Michael A. Miller
> "JB" == JB  <[EMAIL PROTECTED]> writes:

> (1) So finally, thank to your help I have this:

>   summary(lm(x ~ 0+I(t^2)))
[...]

Would you post your data set?  It is hard for me to sort out what
is going on without seeing the input.

Regards, Mike

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] newbie's additional (probably to some extent OT) questions

2003-11-06 Thread JB
(1)
So finally, thank to your help I have this:
 summary(lm(x ~ 0+I(t^2)))

And then I get this result:
=
Call:
lm(formula = x ~ 0 + I(t^2))
Residuals:
   Min 1Q Median 3QMax
-3.332e-02 -9.362e-03  1.169e-05  1.411e-02  3.459e-02
Coefficients:
Estimate Std. Error t value Pr(>|t|)
I(t^2) 0.0393821  0.0001487   264.8   <2e-16 ***
---
Signif. codes:  0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1
Residual standard error: 0.01945 on 18 degrees of freedom
Multiple R-Squared: 0.9997, Adjusted R-squared: 0.9997
F-statistic: 7.014e+04 on 1 and 18 DF,  p-value: < 2.2e-16
=
I see in MuPad, that Delta^2 is 0.006813. Now is not the standard error the 
square root of Delta^2? Should I not get 0.069 as standard error?

(2)
When I use the model
summary(lm(x ~ I(t^2)))
I get (of course) another result with a slightly smaller Delta^2. But I do 
not expect such an error as this would mean that there was a systematic 
error in our measurement of the distance and if I understand the result of 
R correctly, the error was 0.04m which is impossible:

==
Call:
lm(formula = x ~ I(t^2))
Residuals:
   Min 1Q Median 3QMax
-0.0202520 -0.0116533 -0.0006036  0.0036699  0.0432987
Coefficients:
 Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.0427606  0.0161085   2.655   0.0167 *
I(t^2)  0.0379989  0.0005367  70.801   <2e-16 ***
---
Signif. codes:  0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1
Residual standard error: 0.01683 on 17 degrees of freedom
Multiple R-Squared: 0.9966, Adjusted R-squared: 0.9964
F-statistic:  5013 on 1 and 17 DF,  p-value: < 2.2e-16
=
What is going on here?
(Sorry but I am only a high school teacher and have not much idea of 
statistics.)

TIA,

JB

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


RE: Summary: [R] How to represent pure linefeeds chr(10) under R for Windows

2003-11-06 Thread Gabor Grothendieck


Its also possible to avoid these intricacies by not 
using an intermediate text representation, i.e. csv, 
in the first place.  

The following R code uses the free dataload utility 
(Google search for Baird dataload utility) to create 
an .xls file from data frame, x:

   save(x,file="x.rda")
   system("dataload x.rda x.xls/u")

At this point you can read x.xls into Excel.

---
Date: Thu, 6 Nov 2003 20:41:16 +0100 (MET) 
From: Jens =?ISO-8859-1?Q?Oehlschl=E4gel?= <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]> 
Subject: Summary: [R] How to represent pure linefeeds chr(10) under R for Windows 

 
 

Thanks to all who have responded.
My concern was to be able to write a csv file that can have line feeds in
string columns chr(10).
Why? Excel allows line feeds chr(10) within cells and line breaks
chr(13)+chr(10) at line ending, 
but the windows version of R automatically replaces \n by \r\n in writing
and \r\n by \n in reading (text mode).

The clues for a solution came from Brian Ripley and Thomas Lumley: we need
to use "binary" connection mode (will not replace \n by \r\n) and explicit
specification of line ending as "\r\n".
Testing with these gave the following results:

## write.table / read.table: a bit inconsistent: need text connection to
read and binary connection to write
## writeLines / readLines: readLines misses a sep= parameter to properly
read in such data
## writeChar / readChar: OK

Thanks again and
Best regards


Jens Oehlschägel



## Details

filename <- "c:/tmp/c2.csv"


## write.table / read.table: a bit inconsistent: need binary connection to
read and text connection to write

data <- data.frame(a='c\nd', b='"äöüÄÖÜß"')

# writing in text mode replaces \n by \r\n
file <- file(filename, "w")
write.table(data, row.names=FALSE, file=file, sep=";", qmethod="double")
close(file)

# writing in binary mode does not replace \n, however the real line endings
are also \n instead of \r\n
file <- file(filename, "wb")
write.table(data, row.names=FALSE, file=file, sep=";", qmethod="double")
close(file)

# using the eol parameter we can create the desired csv format (which can be
read by Excel
file <- file(filename, "wb")
write.table(data, row.names=FALSE, file=file, sep=";", qmethod="double",
eol="\r\n")
close(file)


# for the read test write a dataset that avoids a reported bug in
read.table()
data <- data.frame(a=c(rep("x", 5), "c\nd"), b=c(rep("y", 5), '"äöüÄÖÜß"'))
file <- file(filename, "wb")
write.table(data, row.names=FALSE, file=file, sep=";", qmethod="double",
eol="\r\n")
close(file)

# read astonishingly works on char mode connection
file <- file(filename, "r")
read.csv2(file)
close(file)

# and doesn't work on binary connection
file <- file(filename, "rb")
read.csv2(file)
close(file)



## writeLines / readLines: readLines misses a sep= parameter to properly
read in such data
data <- c('a;b', 'c\nd;"äöüÄÖÜß"')

# text mode substitutes \n -> \r\n like in write.table
file <- file(filename, "w")
writeLines(data, file, sep="\n")
close(file)

# we can write out the desired one using binary mode and sep="\r\n"
file <- file(filename, "wb")
writeLines(data, file, sep="\r\n")
close(file)

# However, we cannot read this in in binary mode, readLines misses a sep=
parameter
file <- file(filename, "rb")
readLines(file)
close(file)

# text mode replaces as expected
file <- file(filename, "r")
readLines(file)
close(file)



## writeChar / readChar: OK
data <- c('a;b\r\nc\nd;"äöüÄÖÜß"')

# writing text mode substitutes as expected
file <- file(filename, "w")
writeChar(data, file, eos=NULL)
close(file)

# writing binary mode works
file <- file(filename, "wb")
writeChar(data, file, eos=NULL)
close(file)

# reading binary mode works
file <- file(filename, "rb")
readChar(file, nchar(data))
close(file)

# reading text mode substitutes as expected
file <- file(filename, "r")
readChar(file, nchar(data))
close(file)



___
No banners. No pop-ups. No kidding.
Introducing My Way - http://www.myway.com

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] Question about computing offsets automatically

2003-11-06 Thread Marc Schwartz
On Thu, 2003-11-06 at 13:33, Louisell, Paul T. wrote:
> Hi,
> 
> I'm using R version 1.8.0 on Windows NT. When fitting a glm with Poisson
> random component and a log link, I frequently need to include an offset.
> Typically I use xtabs or table to get the counts for the contingency table,
> and then I use as.data.frame.table to create a data frame that I can use in
> the glm function. I have not found an option that allows me to total the
> offset variable to obtain offsets for cells in the contingency table. 
> 
> For example, suppose I have the following data frame named Data:
> 
>   F1 F2 Off
> 1  A  C   4
> 2  A  C   3
> 3  A  C   2
> 4  B  C   3
> 5  A  D   2
> 6  A  D   4
> 7  B  D   1
> 
> xtabs(~F1+F2, data=Data) produces the contingency table:
> 
>F2
> F1  C D
>   A 3 2
>   B 1 1
> 
> And as.data.frame.table(xtabs(~F1+F2, data=Data)) changes the contingency
> table to a data frame suitable for use in the glm function:
> 
>   F1 F2 Freq
> 1  A  C3
> 2  B  C1
> 3  A  D2
> 4  B  D1
> 
> What I'm looking for is some option that would add a 4th column to the
> output of as.data.frame.table which contains the offsets for each cell in
> the contingency table:
> 
>   F1 F2 Freq  Off
> 1  A  C39
> 2  B  C13
> 3  A  D26
> 4  B  D11
> 
> Does such an option exist somewhere in R (I wasn't able to find it in the
> documentation for the table, xtabs, as.data.frame.table, or glm functions)?
> I can obtain the Off column easily enough in a simple loop, but I thought
> there might be an option for this somewhere.


I don't know of an easy 'option' approach, but you can use aggregate()
to get the sums and then do a cbind() to add the fourth column:

> aggregate(Data$Off, list(F1 = Data$F1, F2 = Data$F2), sum)
  F1  F2 x
1  A   C 9
2  B   C 3
3  A   D 6
4  B   D 1

So:

> df <- as.data.frame.table(xtabs(~F1+F2, data = Data))
> df
  F1  F2 Freq
1  A   C3
2  B   C1
3  A   D2
4  B   D1

> Off <- aggregate(Data$Off, list(F1 = Data$F1, F2 = Data$F2), sum)$x
> Off
[1] 9 3 6 1

> cbind(df, Off)
  F1  F2 Freq Off
1  A   C3   9
2  B   C1   3
3  A   D2   6
4  B   D1   1
 

HTH,

Marc Schwartz

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] Question about computing offsets automatically

2003-11-06 Thread Louisell, Paul T.
Hi,

I'm using R version 1.8.0 on Windows NT. When fitting a glm with Poisson
random component and a log link, I frequently need to include an offset.
Typically I use xtabs or table to get the counts for the contingency table,
and then I use as.data.frame.table to create a data frame that I can use in
the glm function. I have not found an option that allows me to total the
offset variable to obtain offsets for cells in the contingency table. 

For example, suppose I have the following data frame named Data:

  F1 F2 Off
1  A  C   4
2  A  C   3
3  A  C   2
4  B  C   3
5  A  D   2
6  A  D   4
7  B  D   1

xtabs(~F1+F2, data=Data) produces the contingency table:

   F2
F1  C D
  A 3 2
  B 1 1

And as.data.frame.table(xtabs(~F1+F2, data=Data)) changes the contingency
table to a data frame suitable for use in the glm function:

  F1 F2 Freq
1  A  C3
2  B  C1
3  A  D2
4  B  D1

What I'm looking for is some option that would add a 4th column to the
output of as.data.frame.table which contains the offsets for each cell in
the contingency table:

  F1 F2 Freq  Off
1  A  C39
2  B  C13
3  A  D26
4  B  D11

Does such an option exist somewhere in R (I wasn't able to find it in the
documentation for the table, xtabs, as.data.frame.table, or glm functions)?
I can obtain the Off column easily enough in a simple loop, but I thought
there might be an option for this somewhere.


Paul Louisell
Statistician
(860) 565-5417
[EMAIL PROTECTED]

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Summary: [R] How to represent pure linefeeds chr(10) under R for Windows

2003-11-06 Thread Jens Oehlschlägel

Thanks to all who have responded.
My concern was to be able to write a csv file that can have line feeds in
string columns chr(10).
Why? Excel allows line feeds chr(10) within cells and line breaks
chr(13)+chr(10) at line ending, 
but the windows version of R automatically replaces \n by \r\n in writing
and \r\n by \n in reading (text mode).

The clues for a solution came from Brian Ripley and Thomas Lumley: we need
to use "binary"  connection mode (will not replace \n by \r\n) and explicit
specification of line ending as "\r\n".
Testing with these gave the following results:

## write.table / read.table: a bit inconsistent: need text connection to
read and binary connection to write
## writeLines / readLines: readLines misses a sep= parameter to properly
read in such data
## writeChar / readChar: OK

Thanks again and
Best regards


Jens Oehlschägel



## Details

filename <- "c:/tmp/c2.csv"


## write.table / read.table: a bit inconsistent: need binary connection to
read and text connection to write

data <- data.frame(a='c\nd', b='"äöüÄÖÜß"')

# writing in text mode replaces \n by \r\n
file <- file(filename, "w")
write.table(data, row.names=FALSE, file=file, sep=";", qmethod="double")
close(file)

# writing in binary mode does not replace \n, however the real line endings
are also \n instead of \r\n
file <- file(filename, "wb")
write.table(data, row.names=FALSE, file=file, sep=";", qmethod="double")
close(file)

# using the eol parameter we can create the desired csv format (which can be
read by Excel
file <- file(filename, "wb")
write.table(data, row.names=FALSE, file=file, sep=";", qmethod="double",
eol="\r\n")
close(file)


# for the read test write a dataset that avoids a reported bug in
read.table()
data <- data.frame(a=c(rep("x", 5), "c\nd"), b=c(rep("y", 5), '"äöüÄÖÜß"'))
file <- file(filename, "wb")
write.table(data, row.names=FALSE, file=file, sep=";", qmethod="double",
eol="\r\n")
close(file)

# read astonishingly works on char mode connection
file <- file(filename, "r")
read.csv2(file)
close(file)

# and doesn't work on binary connection
file <- file(filename, "rb")
read.csv2(file)
close(file)



## writeLines / readLines: readLines misses a sep= parameter to properly
read in such data
data <- c('a;b', 'c\nd;"äöüÄÖÜß"')

# text mode substitutes \n -> \r\n like in write.table
file <- file(filename, "w")
writeLines(data, file, sep="\n")
close(file)

# we can write out the desired one using binary mode and sep="\r\n"
file <- file(filename, "wb")
writeLines(data, file, sep="\r\n")
close(file)

# However, we cannot read this in in binary mode, readLines misses a sep=
parameter
file <- file(filename, "rb")
readLines(file)
close(file)

# text mode replaces as expected
file <- file(filename, "r")
readLines(file)
close(file)



## writeChar / readChar: OK
data <- c('a;b\r\nc\nd;"äöüÄÖÜß"')

# writing text mode substitutes as expected
file <- file(filename, "w")
writeChar(data, file, eos=NULL)
close(file)

# writing binary mode works
file <- file(filename, "wb")
writeChar(data, file, eos=NULL)
close(file)

# reading binary mode works
file <- file(filename, "rb")
readChar(file, nchar(data))
close(file)

# reading text mode substitutes as expected
file <- file(filename, "r")
readChar(file, nchar(data))
close(file)



--

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


RE: [R] building r-patch

2003-11-06 Thread Vadim Ogranovich
Thank you for Dirk Eddelbuettel and Prof. Ripley for pointing out to
tools/rsync-recommended. Maybe it is wort mentioning in the R
Administration guide and in the INSTALL file?

Thanks,
Vadim

> -Original Message-
> From: Prof Brian Ripley [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, November 05, 2003 11:10 PM
> To: [EMAIL PROTECTED]
> Cc: R-Help
> Subject: Re: [R] building r-patch
> 
> 
> The first is more or less what you should expect.
> 
> On Wed, 5 Nov 2003, Vadim Ogranovich wrote:
> 
> > Hi,
> >  
> > I am building r-patch from the sources (rsync-ed today).
> >  
> > make check produced the following message:
> >  
> > running tests of Internet and socket functions
> >   expect some differences
> > make[3]: Entering directory `/usr/evahome/vograno/R/tests' running 
> > code in 'internet.R' ... OK comparing 'internet.Rout' to 
> > './internet.Rout.save' ...18c18 < Content type `text/plain; 
> > charset=iso-8859-1' length 134991 bytes
> > ---
> > > Content type `text/plain; charset=iso-8859-1' length 124178 bytes
> > 22,23c22,23
> > < .. .. .. .
> > < downloaded 131Kb
> > ---
> > > .. .. .
> > > downloaded 121Kb
> > 25c25
> > < [1] 273
> > ---
> > > [1] 251
> > 60,61d59
> > < Error in url("  http://foo.bar";, "r") : unable to 
> > open connection < In addition: Warning message:
> > 62a61
> > > Error in url("  http://foo.bar";, "r") : unable to 
> > > open
> > connection
> > 365,370c364
> > <  Login: root  Name: root
> > < Directory: /root Shell: /bin/tcsh
> > < Last login Wed Nov  5 13:34 (PST) on pts/1 from 
> > verdi.irisfinancial.com < New mail received Wed Nov  5 04:02 2003 
> > (PST)
> > <  Unread since Fri Oct 24 04:02 2003 (PDT )
> > < No Plan.
> > ---
> > > Error in make.socket(host, port) : Socket not established
> >  OK
> > 
> >  
> >  
> > I noticed that I had to expect some differences so my 
> question is how 
> > to tell whether it's harmless or not?
> >  
> >  
> > Other questions are related to building of recommended packages:
> > * The src/library/Recommended directory was empty. Is it expected?
> 
> No.  You forgot to run tools/rsync-recommended in the sources.
> 
> > If
> > yes, how to download the entire bundle of recommended 
> packages (I know 
> > I can get them one by one)? Is install.packaes() the 
> recommended way?
> > * make check tried to test MASS and survival (and failed 
> because the 
> > packages were not there), but it didn't try to test the other 
> > recommended  packages. Why only these two?
> 
> It did not test those packages, it tried to make use of them. 
>  make check-all would have tested the recommended packages.
> 
> -- 
> Brian D. Ripley,  [EMAIL PROTECTED]
> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> University of Oxford, Tel:  +44 1865 272861 (self)
> 1 South Parks Road, +44 1865 272866 (PA)
> Oxford OX1 3TG, UKFax:  +44 1865 272595
>

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


RE: [R] Contrast

2003-11-06 Thread Warnes, Gregory R
Or ?contrast in the Design library.

-G

> -Original Message-
> From: Simon Blomberg [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 04, 2003 8:32 PM
> To: Igor Roytberg; [EMAIL PROTECTED]
> Subject: RE: [R] Contrast
> 
> 
> see ?fit.contrast in library gregmisc.
> 
> Cheers,
> 
> Simon.
> 
> Simon Blomberg, PhD
> Depression & Anxiety Consumer Research Unit
> Centre for Mental Health Research
> Australian National University
> http://www.anu.edu.au/cmhr/
> [EMAIL PROTECTED]  +61 (2) 6125 3379
> 
> 
> > -Original Message-
> > From: Igor Roytberg [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, 5 November 2003 12:04 PM
> > To: [EMAIL PROTECTED]
> > Subject: [R] Contrast
> > 
> > 
> > Could anyone please explain how to set up contrasts between 
> > means in R. I want to know if "before I conduct an experiment 
> > and believe the mean for 1 and 2 will be different from means 
> > 3 and 4, Is this true?"  That is what I have to prove or 
> > disprove, I thought that contrasts would be the way to go. 
> > Thanks for the help. 
> > 
> > Igor
> > [[alternative HTML version deleted]]
> > 
> > __
> > [EMAIL PROTECTED] mailing list
> > https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> >
> 
> __
> [EMAIL PROTECTED] mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> 


LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] GDB under windows

2003-11-06 Thread Prof Brian Ripley
On Thu, 6 Nov 2003, Duncan Murdoch wrote:

> On Thu, 6 Nov 2003 11:04:25 - , "Marsland, John"
> <[EMAIL PROTECTED]> wrote :
> 
> >Does anybody have some simple instructions to get me going using the GNU
> >debugger GDB under windows with R? 
> >
> >The R Extensions manual mentions briefly debugging under unix, but I've seen
> >seen GDB mention in the Bloodshed Dev C++ IDE so it should be possible to
> >use it with R?
> 
> I've got a few tips beyond those in the FAQ, but haven't had a chance
> to write them down anywhere.  If anyone wants to volunteer to write
> this up, I think it would be worthwhile putting them in a web page for
> future reference.
> 
> One tip:  in recent versions of R (but hopefully not in 1.8.1), gdb
> always traps on a few memory allocation errors during startup.  This
> is irritating but harmless, continuing from that point on will
> eventually get R to start.

That is unlikely to be fixed in 1.8.1 but is already fixed in R-devel.  
The changes involved are quite far-reaching.

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


RE: [R] R for various ports of linux

2003-11-06 Thread Jackson, Alan AK SIEP-EPT-AEN
Ahh that's the beauty of gentoo Linux and emerge. You get to compile from source, but 
at the same time it keeps track of what you have done. There is now a Freshmeat 
project for emerge on other platforms, so others can take advantage of this model if 
they wish.


Alan Jackson
Staff Geophysicist
Shell International Exploration and Production Inc.
3737 Bellaire Blvd, P O Box 481, Houston, Texas 77001-0481, USA

Tel: +0117132457355 none Other Tel: +011-713-245-7355
Email: [EMAIL PROTECTED]
Internet: http://www.shell.com/eandp-en


-Original Message-
From: Ben Bolker [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 05, 2003 4:29 PM
To: Jason Turner
Cc: [EMAIL PROTECTED]; Nathan Leon Pace, MD,MStat
Subject: Re: [R] R for various ports of linux



  I've always built from source and almost never had to do anything beyond 
"tar zxf sources.tgz; ./configure; make; make install" (on various Red Hat 
versions).  On the other hand ... I've been hoping to move in the 
direction of an apt- or rpm-based solution to get a better handle on 
tracking package versions etc. etc. across multiple machines ...  It does 
seem as though the Debian folks (Eddelbuettel [sp]?) are very quick about 
packaging apt versions ...

   Ben

On Thu, 6 Nov 2003, Jason Turner wrote:

> Nathan Leon Pace, MD, MStat wrote:
> 
> > To all:
> > 
> > I currently download the R binaries for Redhat 7.x Linux.
> > 
> > There is considerable turmoil in the vendors of Linux. Redhat apparently 
> > is changing it's business model to paid versions.
> > 
> > This might motivate my department to use a different vendor of Linux.
> > 
> > Is there anything predictable about which vendors/versions of Linux will 
> > have R binaries in the future?
> 
> Short answer: build from source.  You won't regret it.
> 
> Long answer:
> The "build from source" approach is remarkably painless under any Linux 
> distribution I've tried (RH, SuSE, Slackware, et. al.).  It's also 
> painless under Solaris.
> 
> The days of having to be a programmer to build R from source have been 
> over for years.  If you're computer literate enough to use R, you're 
> probably over-qualified to build from sources.
> 
> Kudos to R-core for their attention to detail in making what's 
> complicated "under the hood" quite simple for the end user.
> 
> Alternate answer:
> If you absolutely must have binaries, there will be binaries as long as 
> there are users of your OS with time they wish to commit to building 
> them.  This may be where your sysadmin steps in :)
> 
> Cheers
> 
> Jason
> 

-- 
620B Bartram Hall[EMAIL PROTECTED]
Zoology Department, University of Floridahttp://www.zoo.ufl.edu/bolker
Box 118525   (ph)  352-392-5697
Gainesville, FL 32611-8525   (fax) 352-392-3704

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] created data doesn't remain when split...

2003-11-06 Thread Prof Brian Ripley
On Thu, 6 Nov 2003, Jeff D. Hamann wrote:

> I've been trying to figure out why the following is happening
> 
> I've got some data I'll load in from a file...
> 
> rm(list=ls(all=TRUE))
> trees <- read.table( "c:/cruisepak/data.txt", header=T)
> trees$ct <- 1

That is incorrect usage: you set the last element to 1, and you used list
indexing on a data frame.  Either use

tree["ct"] <- 1

or, better,  use a value of the correct length.  (As from 1.8.0 using
$ with data frames is supported.)

> And when I create some temp variable, then split the data to perform further
> processing, the additional column doesn't maintain the data correctly

Actually, it was maintained correctly.

> mtrees <- trees[trees$m == 1,]
> ctrees <- trees[trees$m == 0,]
> 
> The results are as follows...
> 
> > trees
> plot tree m sp dbh tht ct
> 1  11 1 DF  44 185 1
> 3  13 0 DF  40 192  1
> .blah, blah, blah..
> 6  16 0 DF  26 156   1
> 8  18 0 DF  26 155   1

That's a bug that got fixed in 1.8.0.
 
> but,
> >mtrees
> plot tree m sp dbh tht ct
> 1  11 1 DF  44 185 1
> 2  12 1 DF  38 188NA
> 17 26 1 DF  26 174NA
> 26 31 1 DF  42 185NA
> 
> and
> 
> >ctrees
> > ctrees
> plot tree m sp dbh tht  ct
> 3  13 0 DF  40 192NA
> 4  14 0 DF  33 148NA
> 5  15 0 DF  43 182NA
> 
> when the value of ct for all the records in all the data.frames should be 1,
> not NA.
> 
> Why is that? Am I missing a step here? I'm running R 1.7.1 on Win2k.

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] GDB under windows

2003-11-06 Thread Duncan Murdoch
On Thu, 6 Nov 2003 11:04:25 - , "Marsland, John"
<[EMAIL PROTECTED]> wrote :

>Does anybody have some simple instructions to get me going using the GNU
>debugger GDB under windows with R? 
>
>The R Extensions manual mentions briefly debugging under unix, but I've seen
>seen GDB mention in the Bloodshed Dev C++ IDE so it should be possible to
>use it with R?

I've got a few tips beyond those in the FAQ, but haven't had a chance
to write them down anywhere.  If anyone wants to volunteer to write
this up, I think it would be worthwhile putting them in a web page for
future reference.

One tip:  in recent versions of R (but hopefully not in 1.8.1), gdb
always traps on a few memory allocation errors during startup.  This
is irritating but harmless, continuing from that point on will
eventually get R to start.

Duncan Murdoch

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] created data doesn't remain when split...

2003-11-06 Thread Jeff D. Hamann

I've been trying to figure out why the following is happening

I've got some data I'll load in from a file...

rm(list=ls(all=TRUE))
trees <- read.table( "c:/cruisepak/data.txt", header=T)
trees$ct <- 1

And when I create some temp variable, then split the data to perform further
processing, the additional column doesn't maintain the data correctly

mtrees <- trees[trees$m == 1,]
ctrees <- trees[trees$m == 0,]

The results are as follows...

> trees
plot tree m sp dbh tht ct
1  11 1 DF  44 185 1
3  13 0 DF  40 192  1
.blah, blah, blah..
6  16 0 DF  26 156   1
8  18 0 DF  26 155   1


but,
>mtrees
plot tree m sp dbh tht ct
1  11 1 DF  44 185 1
2  12 1 DF  38 188NA
17 26 1 DF  26 174NA
26 31 1 DF  42 185NA

and

>ctrees
> ctrees
plot tree m sp dbh tht  ct
3  13 0 DF  40 192NA
4  14 0 DF  33 148NA
5  15 0 DF  43 182NA

when the value of ct for all the records in all the data.frames should be 1,
not NA.

Why is that? Am I missing a step here? I'm running R 1.7.1 on Win2k.


Jeff.

---
Jeff D. Hamann
Forest Informatics, Inc.
PO Box 1421
Corvallis, Oregon USA 97339-1421
(office) 541-754-1428
(cell) 541-740-5988
[EMAIL PROTECTED]
www.forestinformatics.com


---
Jeff D. Hamann
Forest Informatics, Inc.
PO Box 1421
Corvallis, Oregon USA 97339-1421
(office) 541-754-1428
(cell) 541-740-5988
[EMAIL PROTECTED]
www.forestinformatics.com

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] Lexical scoping

2003-11-06 Thread r
Comparing SPlus and R: a lesson in lexical scoping. If you consider to move to S, be 
aware of the following.

Consider the piece of code:

f <- function(x) {
  g <- function(y) {
x + y
  }
  g(0)
}

What would be the result of calling f(10)? Try it in SPlus. They are too professional 
to make their product work well...

r.ar

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


RE: [R] import data troubles

2003-11-06 Thread Gabor Grothendieck

 --- On Thu 11/06, STOLIAROFF VINCENT < [EMAIL PROTECTED] > wrote:
> I'd like to know if there is a function for importing datas from 
> excel file? 

There are a number of choices:

- select range in Excel, press ctrl-c and read in the data from the
clipboard using read.table("clipboard",header=T)

- write out the data from Excel into a .csv file and use
read.csv

- use Baird's dataload utility (search Google) and convert the
.xls file to .rda format and then use the R load command.
You can alternately use dataload to convert the xls file
to csv or text and then proceed as above.

- use the RODBC package to directly read the .xls file.

- use the RDCOM package.  Its not in CRAN so search for it.  This
also directly reads the .xls file.




___
No banners. No pop-ups. No kidding.
Introducing My Way - http://www.myway.com

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


RE: [R] import data troubles

2003-11-06 Thread Gabor Grothendieck

 --- On Thu 11/06, STOLIAROFF VINCENT < [EMAIL PROTECTED] > wrote:
> I'd like to know if there is a function for importing datas from 
> excel file? 

There are a number of choices:

- select range in Excel, press ctrl-c and read in the data from the
clipboard using read.table("clipboard",header=T)

- write out the data from Excel into a .csv file and use
read.csv

- use Baird's dataload utility (search Google) and convert the
.xls file to .rda format and then use the R load command.
You can alternately use dataload to convert the xls file
to csv or text and then proceed as above.

- use the RODBC package to directly read the .xls file.

- use the RDCOM package.  Its not in CRAN so search for it.  This
also directly reads the .xls file.




___
No banners. No pop-ups. No kidding.
Introducing My Way - http://www.myway.com

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] Hierarchical glm

2003-11-06 Thread Pascal A. Niklaus
Hi all,

I'm not sure how to correctly analyse the following data with glm, and 
hope for some advice from this list, ideally showing how to specify the 
model in R and perform the tests, and also for suggestions of literature.

The data structure is like this:

  - 20 plant populations were investigated (random factor pop), which 
belong to different habitat types (factor ht)
  - Within each plant population, individuals were grouped into 3 size 
classes (factor sz)
  - For each individual, some count data were recorded

The independent variables I'd like to analyse are either poission of 
binomially distributed.

For gaussian data, I would use the following model:

  ht + pop %in% ht + sz + sz:ht + sz : pop %in %ht

ht would basically be tested against pop (because the population is the 
unit of replication for ht), and sz against sz:pop:ht. (the hypotheses 
to test are that ht has an effect, and whether the effect of sz on 
individuals of a population depends on ht)

However, I do not know how to translate this to the deviance analysis 
case. For example, when I fit the whole model, and then drop ht to test 
for the effect of ht, the effect of ht shows up in pop (I understand 
why, but don't know how to do this otherwise). If I compare the null 
model to the model including ht only, do I then commit a pseudoreplication?

Thanks for your help

Pascal

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] How to setup proxy in R for windows?

2003-11-06 Thread Marc Schwartz
On Thu, 2003-11-06 at 10:09, Yun Xu wrote:
> Dear All:
> 
> I just want to ask how can I setup proxy address in R for win32? I remember
> I had read a relative topic in R-help before, but I can't find it anymore.
> Anyhelp would be very appreciated!
> 
> Yun
> School of Chemistry
> University of Bristol


See R Windows FAQ 2.17 at:

http://cran.r-project.org/bin/windows/rw-FAQ.html

A search of the R Help archives at:

http://maths.newcastle.edu.au/~rking/R/

results in 104 hits using 'windows' and 'proxy' as keywords:

http://www.google.com/u/newcastlemaths?q=windows+proxy&sa=Google+Search

HTH,

Marc Schwartz

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] Absolut newbie questions

2003-11-06 Thread Pascal A. Niklaus
summary(lm(x ~ I(t^2))), but you should probably read the "Introduction 
to R"

Pascal

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] How to setup proxy in R for windows?

2003-11-06 Thread Prof Brian Ripley
Do read the rw-FAQ and then ?download.file

On Thu, 6 Nov 2003, Yun Xu wrote:

> I just want to ask how can I setup proxy address in R for win32? I remember
> I had read a relative topic in R-help before, but I can't find it anymore.
> Anyhelp would be very appreciated!


-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] Absolut newbie questions

2003-11-06 Thread Philipp Pagel
Hi!

> We have just measured dx and dt (d standing here for \Delta) on an inclined 
> plain and received some data thet are in two lists (x_list and t_list). The 
> theory says, that dx = a/2*(dt)^2 for a constant a.
> 
> I should like to fit the data against the theoretical prediction. This 
> should deliver an estimate for a.

You will find everyhing you want to know in the chapter on statistical
models in the manual "Introduction to R". Also look at the online
documentation for lm() and maybe nls().

> Then I should like to graph the data (as bullets) and the predicted 
> function into the same graph.

Have a look at the documentation for plot(), line() and predict(). 

cu
Philipp

-- 
Dr. Philipp PagelTel.  +49-89-3187-3675
Institute for Bioinformatics / MIPS  Fax.  +49-89-3187-3585
GSF - National Research Center for Environment and Health
Ingolstaedter Landstrasse 1
85764 Neuherberg, Germany

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


RE: [R] for help about R--probit

2003-11-06 Thread Prof Brian Ripley
And did you actually look at the fitted values?  I got 22 ones.  For a
substantial part of your x1-x2 space there are no failures.  The warning 
is telling you that the fitted probabilities are so close to one as to be 
unreliable.  The largest is 1-exp-20!

On Thu, 6 Nov 2003, L Z wrote:

> Not real data. It was gererated randomly. The original codes are the following:
>  
> par(mfrow=c(2,1))
> n <- 500
> 
> #
> #DATA GENERATING PROCESS#
> #
> x1  <- rnorm(n,0,1)
> x2  <- rchisq(n,df=3,ncp=0)-3
> sigma <- 1
> u1   <- rnorm(n,0,sigma)
> ylatent1 <-x1+x2+u1
> y1   <- (ylatent1 >=0)  # create the binary indicator
> ###
> #THE Probit Estimation#
> ###
> probit<-glm(y1~x1+x2-1, family=binomial(link=probit))
> bp<-probit$coef[2]/probit$coef[1]
> bp;
> I also tried family=quasibinomial. There seems no error message. But the result is 
> different from what I got from Gauss. For u1 belongs to another distribution (not 
> normal), the difference is even larger. I used the same data for the comparison.
>  
> Thanks a lot!
> 
> Steve Sullivan <[EMAIL PROTECTED]> wrote:
> Is this simulated or actual data?
> 
> STS
> 
> Steven Sullivan, Ph.D.
> Senior Associate
> The QED Group, LLC
> 1250 Eye St. NW, Suite 802
> Washington, DC 20005
> [EMAIL PROTECTED]
> 202.898.1910.x15 (v)
> 202.898.0887 (f)
> 202.421.8161 (m)
> 
> 
> -Original Message-
> From: L Z [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, November 05, 2003 12:10 PM
> To: [EMAIL PROTECTED]
> Subject: [R] for help about R 
> 
> just want to ask the following
> > > question:
> > > > probit<-glm(y1~x1+x2-1,
> > > family=binomial(link=probit))
> > > Warning message:
> > > fitted probabilities numerically 0 or 1 occurred
> in:
> > > glm.fit(x = X, y = Y,
> > > weights = weights, start = start, etastart =
> > > etastart,
> > > why does that happen?
> 
> 
> 
> 
> -
> 
> 
>   [[alternative HTML version deleted]]
> 
> __
> [EMAIL PROTECTED] mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> 
> 

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] How to setup proxy in R for windows?

2003-11-06 Thread Yun Xu
Dear All:

I just want to ask how can I setup proxy address in R for win32? I remember
I had read a relative topic in R-help before, but I can't find it anymore.
Anyhelp would be very appreciated!

Yun
School of Chemistry
University of Bristol

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] Absolut newbie questions

2003-11-06 Thread JB
I teach at a high school and should like to find out, if I can use R for my 
teaching. So I jhave installed it on my XP system and now I should like to 
solve a simple problem:

We have just measured dx and dt (d standing here for \Delta) on an inclined 
plain and received some data thet are in two lists (x_list and t_list). The 
theory says, that dx = a/2*(dt)^2 for a constant a.

I should like to fit the data against the theoretical prediction. This 
should deliver an estimate for a.

Then I should like to graph the data (as bullets) and the predicted 
function into the same graph.

Is this possible? I suspect that the answer is "yes" and that R is an 
overkill for this.

Could somebody tell me how to do these things? (I need only a few lines of 
MuPad or Maple for this; the problem is that I own a MuPad license but the 
school does not.)

TIA,
Janos Blazi
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


RE: [R] for help about R--probit

2003-11-06 Thread L Z
Not real data. It was gererated randomly. The original codes are the following:
 
par(mfrow=c(2,1))
n <- 500

#
#DATA GENERATING PROCESS#
#
x1  <- rnorm(n,0,1)
x2  <- rchisq(n,df=3,ncp=0)-3
sigma <- 1
u1   <- rnorm(n,0,sigma)
ylatent1 <-x1+x2+u1
y1   <- (ylatent1 >=0)  # create the binary indicator
###
#THE Probit Estimation#
###
probit<-glm(y1~x1+x2-1, family=binomial(link=probit))
bp<-probit$coef[2]/probit$coef[1]
bp;
I also tried family=quasibinomial. There seems no error message. But the result is 
different from what I got from Gauss. For u1 belongs to another distribution (not 
normal), the difference is even larger. I used the same data for the comparison.
 
Thanks a lot!

Steve Sullivan <[EMAIL PROTECTED]> wrote:
Is this simulated or actual data?

STS

Steven Sullivan, Ph.D.
Senior Associate
The QED Group, LLC
1250 Eye St. NW, Suite 802
Washington, DC 20005
[EMAIL PROTECTED]
202.898.1910.x15 (v)
202.898.0887 (f)
202.421.8161 (m)


-Original Message-
From: L Z [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 05, 2003 12:10 PM
To: [EMAIL PROTECTED]
Subject: [R] for help about R 

just want to ask the following
> > question:
> > > probit<-glm(y1~x1+x2-1,
> > family=binomial(link=probit))
> > Warning message:
> > fitted probabilities numerically 0 or 1 occurred
in:
> > glm.fit(x = X, y = Y,
> > weights = weights, start = start, etastart =
> > etastart,
> > why does that happen?




-


[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] how to install tkrplot?

2003-11-06 Thread Uwe Ligges
ruben dario solares wrote:

   Hello, my question is on as installing tkrplot, i want to charge it
   but appears "first.lib Failed" therefore says that not exist the
   tkrplot.dll and I download the tkrplot.zip and i unzip him and the
   file is  in the path c: \R\1071\library\libs\tkrplot.dll, that should
   do so that find the. dll?  Thanks Ruben
 _
   Nuevo MSN Messenger [1]Una forma rápida y divertida de enviar mensajes

References

   1. http://g.msn.com/8HMAESAR/2737??PS=
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


PLEASE, read the FAQs and manuals before posting questions like this on 
R-help (you are already "famous" among R-help readers for posting such 
questions). It is mentioned in the R for Windows FAQs how packages are 
installed! And PLEASE, don't post questions more than once.

install.packages("tkrplot")
 should do it for you.
BTW: After unzipping the package manually, the DLL should appear in 
(guessed from above) c:\R\1071\library\tkrplot\libs\tkrplot.dll
on your machine.

Uwe Ligges

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] Re: using LSODA in R

2003-11-06 Thread Stephen Ellner
I think an additional problem is that the derivatives function 
must be 'told' where to 'look' in y for the values of R, C, and P 
that are used to compute Rprime,Cprime, Pprime - it has no way of
'knowing' that the model's state vector y consists of
the variables (R,C,P). Appended below is an example of code
that works to solve a similar system of equations. Perhaps 
it might be useful to add something like that to the 
?lsoda page?  

> function(times,y,p)
> {
> Rprime <-
> (R*(1-R))-((xc*yc*C*R)/(R+R0))-((w*xp*ypr*P*R)/(R02+((1-w)*C)+(w*R)))
> Cprime <-
> (-1*(xc*C)*(1-(yc*R)/(R+R0)))-(((1-w)*xp*ypc*P*C)/((w*R)+((1-w)*C)+C0))
> Pprime <-
> 
>(-1*P)-(((1-w)*xp*ypc*C*P)/((w*R)+((1-w)*C)+C0))+((w*xp*ypr*P*R)/((w*R)+((1-w)*C)+R02))
>list(c(Rprime, Cprime, Pprime))
>}

require(odesolve);

# Set parameter values
bmaxc=3.3; bmaxb=2.25; Kc=4.3; Kb=15; ni=80;
m=0.05; lambda=0.4; epsilon=0.25; delta=0.95;

f2k=function(t,y,parms){
dy=rep(0,4); 
n=y[1]; c=y[2]; r=y[3]; b=y[4];
fcn=bmaxc*n/(Kc+n);  
fbc=bmaxb*c/(Kb+c);
dy[1]=delta*(ni-n)-fcn*c;
dy[2]=fcn*c-fbc*b/epsilon-delta*c;
dy[3]=fbc*r-(delta+m+lambda)*r;
dy[4]=fbc*r-(delta+m)*b;
list(dy);
}   

y0=c(1,70,.01,.01); times=(0:240)/4; parms=0; 
out=lsoda(y0, times, f2k, parms, rtol=1e-4, atol=1e-4);
matplot(times,cbind(out[,3]/5,out[,5]),type="l",col=c("green","red"), lty=1,
xlab="Time (d)", ylab="Prey (green) and Predators (red)"); 


Stephen P. Ellner ([EMAIL PROTECTED])
Department of Ecology and Evolutionary Biology
Corson Hall, Cornell University, Ithaca NY 14853-2701
Phone (607) 254-4221FAX (607) 255-8088

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


RE: [R] Number of Days

2003-11-06 Thread Gabor Grothendieck


ndays <- strptime(ex,format="%d%b%Y") - strptime(x,format="%d%b%Y")

If you need it in a calculation then as.numeric(ndays) might be
useful.

---
 
Date: Wed, 5 Nov 2003 23:33:33 -0600 
From: umeno <[EMAIL PROTECTED]>
To: R-Help  
Subject: [R] Number of Days 

 
 
Hi everyone,

I have been trying to compute numbers of days between two dates as follows:

> x <- c("1jan1960", "2jan1960", "31mar1960", "30jul1960")
> z <- format(x, "%d%b%Y")
> ex <- c("1jan1961", "15jan1960", "21mar1975", "10jul1981")
> ez <- format(ex, "%d%b%Y")
> ez-z
Error in ez - z : non-numeric argument to binary operator

As you may see, I am getting an error. Can anyone tell me how I can convert z 
and ez to numeric vectors, so that I can compute days between the 
corresponding dates in these vectors?

thank you
soyoko

__
Ms. Soyoko Umeno
Graduate Research Assitant for the Illinois-Missouri Biotechnology Alliance (IMBA) at 
http://www.imba.missouri.edu/
Ph.D. Student at the Department of Agricultural and Consumer Economics
at the University of Illinois at Urbana-Champaign
Office Phone: 217-333-3417 or 217-333-0364
Fax: 217-244-4817
Mailing Address: 1301 W. Gregory Dr. MC710, Urbana, IL 61801


___
No banners. No pop-ups. No kidding.
Introducing My Way - http://www.myway.com

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] how to install tkrplot?

2003-11-06 Thread ruben dario solares

   Hello, my question is on as installing tkrplot, i want to charge it
   but appears "first.lib Failed" therefore says that not exist the
   tkrplot.dll and I download the tkrplot.zip and i unzip him and the
   file is  in the path c: \R\1071\library\libs\tkrplot.dll, that should
   do so that find the. dll?  Thanks Ruben
 _

   Nuevo MSN Messenger [1]Una forma rápida y divertida de enviar mensajes

References

   1. http://g.msn.com/8HMAESAR/2737??PS=
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] how to install tkrplot.zip

2003-11-06 Thread solares
Hi, mi question is for how to install tkrplot, i like to load him but i' 
failed (i see "first.lib Failed") because he said  not exist the file 
tkrplot.dll but i download the tkrplot.zip and i unzip him in the file 
c:\R\1071\library\libs\tkrplot.dll (R 1.7.1), what i do to make for the R 
encounter the .dll file? thanks Ruben

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] R function help arranged in categorical order ?

2003-11-06 Thread Martin Maechler
> "BDR" == Prof Brian Ripley <[EMAIL PROTECTED]>
> on Wed, 5 Nov 2003 15:51:09 + (GMT) writes:

BDR> On Wed, 5 Nov 2003, David Brahm wrote:
>> Neil Osborne <[EMAIL PROTECTED]> wrote: > Is any
>> one aware of R help documentation that is aranged in
>> functional > categories for e.g.: > String manipulation >
>> File I/O > Dataframe, List manipulation
>> 
>> There really oughta be.  Several people replied with ways
>> to search the help, but that assumes you know the
>> specific task you want to perform, and the right
>> "keyword" to describe it.  Beginners often just want to
>> learn what's available.

BDR> Well, as described in your quotation you need to know
BDR> the `functional categories' and help.start's search
BDR> page does list the known `functional categories' and
BDR> will list under each one. So there really IS, not
BDR> `oughta be',

BDR> Similarly help.search can list by categories, aka
BDR> keywords.  Perhaps its help page needs to say where the
BDR> list of standard keywords is.

Good, idea!
such as tell the user to execute
file.show(file.path(R.home(),"doc", "KEYWORDS"))

{BTW, a problem with KEYWORDS is that "R CMD check" works
 with KEYWORDS.db, and the human readable KEYWORDS needs to be
 kept in sync with *.db manually}.

Martin

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] Levelplot and NAs

2003-11-06 Thread Deepayan Sarkar
On Thursday 06 November 2003 05:33, AJ Smit wrote:
> Dear all
>
> How does one get a levelplot (lattice library) to plot NAs in a
> different colour to that specified in the default colorkey?

You can't do it. If you don't need to distinguish NA's and missing points 
(that is (x,y) pairs that are completely absent from the data, as opposed to 
being present with a z-value of NA), you can use panel.fill() to fill the 
background with your 'NA' color. Something like

levelplot(...

  panel = function(...) {
  panel.fill(col = "red")
  panel.levelplot(...)
  })

Otherwise, change NA's to some suitable number before plotting.

Deepayan

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] Statistics newbie question

2003-11-06 Thread James Noble

Hi there,

I am relatively new to R and statistics.

I have large dataset where each sample has about 3000 dimensions, 
and belongs to one of 13 classes. I am wanting to measure the statistical
significance of each dimension with respect to the class, in order to
find what dimensions are likely to be good predictors.

I undertand the standard way to do this is with ANOVA or regression, 
but am not to sure if these methods are the most suitable. 

If this is a good way to approach it how do I code it as  a regression
problem in R.

Thanks for your help.

-James

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] R function help arranged in categorical order ?

2003-11-06 Thread Duncan Murdoch
On Thu, 06 Nov 2003 19:18:28 +1300, you wrote:

>
>>Similarly help.search can list by categories, aka keywords.  Perhaps its 
>>help page needs to say where the list of standard keywords is.
>>
>>  
>>
>But to list all the help pages in a given "category", you need to use 
>help.search(keyword="iplot",agrep=FALSE,package="base")
>or is there an easier way?

Use help.start().  This starts the HTML help system.  Follow the link
to "Search engine and keywords".

This works as long as you have an HTML browser configured.

Duncan Murdoch

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] Levelplot and NAs

2003-11-06 Thread AJ Smit
Dear all

How does one get a levelplot (lattice library) to plot NAs in a
different colour to that specified in the default colorkey? 

Thanks in advance,
Albertus

-- 
Dr. Albertus J. Smit
Department of Botany
University of Cape Town
PO Box Rondebosch
7700
SOUTH AFRICA

-
This mail sent through IMP: http://horde.org/imp/

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] R for various ports of linux

2003-11-06 Thread Martyn Plummer
On Wed, 2003-11-05 at 22:07, Nathan Leon Pace, MD, MStat wrote:
> To all:
> 
> I currently download the R binaries for Redhat 7.x Linux.
> 
> There is considerable turmoil in the vendors of Linux. Redhat 
> apparently is changing it's business model to paid versions.
> 
> This might motivate my department to use a different vendor of Linux.
> 
> Is there anything predictable about which vendors/versions of Linux 
> will have R binaries in the future?

I hadn't really given it much thought. I suppose I shall switch to
creating RPMS for Fedora, since there won't be a Red Hat Linux 10. Don't
hold your breath for RPMS for the Enterprise Version of Red Hat unless
we (IARC) can negotiate a sweet licensing deal.

I don't think Red Hat are abandoning poor acadamic users. They just
aren't making money out of their boxed set, so they're replacing it with
Fedora.

Martyn

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] RE: import data troubles

2003-11-06 Thread STOLIAROFF VINCENT
I am sorry for polluting the list I have solved my problem: the text
file was written in unicode format.

>  -Message d'origine-
> De :  STOLIAROFF VINCENT  
> Envoyé :  jeudi 6 novembre 2003 12:04
> À :   '[EMAIL PROTECTED]'
> Objet :   import data troubles 
> 
> HI R lovers,
> 
> I have been facing a petty trouble with datas' import :
> 
> I have a plain txt file (see attached file or the copy below) that I
> cannot read either with scan or read.table
> 
> 
> > scan(file="F:/Alt/HDG/Stoliaroff/Data/test.txt")
> Error in scan(file = "F:/Alt/HDG/Stoliaroff/Data/test.txt") : 
> "scan" expected a real, got "ÿþ6"
> 
> > read.table(file="F:/Alt/HDG/Stoliaroff/Data/test.txt")
> V1
> 1  ÿþ6
> 2   \n
> 36
> 44
> 55
> 63
> 73
> 8   \n
> 96
> 10   4
> 11   5
> 12   3
> 13   3
> 14  \n
> 15   6
> 16   4
> 17   5
> 18   3
> 19   2
> 20  \n
> 21   6
> 22   4
> 23   5
> 24   3
> 25   2
> 26  \n
> 27 
> 
> 
> 
> My file is as simple as:
> 
> 62.5000   47.5048 56.8500 36.4700 32.4500 
> 62.1500   47.0952 55.0500 35.5600 30.1500 
> 61.3300   45.2476 53.6500 34.8200 29.4900 
> 61.6600   46.2286 53.8500 35.2000 30.6400 
> 62.   47.3714 54.4400 35.1100 30.1600 
> 60.8500   46.7143 52.9900 34.4200 29.3400 
> 61.0900   46.4381 52.7600 33.9600 29.1000 
>   
> 
> << Fichier: test.txt>>
> 
> Does anybody have an idea of the cause of my problem?
> 
> Besides, I'd like to know if there is a function for importing datas from
> excel file? I cannot find one...
> 
> Thanks a lot for any help
> Sorry for my poor english and the possible irrelevancy of my questions
> 
> Vincent
> 
> 
> 
*
Ce message et toutes les pieces jointes (ci-apres le "message") sont
confidentiels et etablis a l'intention exclusive de ses destinataires.
Toute utilisation ou diffusion non autorisee est interdite. 
Tout message electronique est susceptible d'alteration. 
SG Asset Management et ses filiales declinent toute responsabilite au titre
de ce message s'il a ete altere, deforme ou falsifie.

Découvrez l'offre et les services de SG Asset Management sur le site
www.sgam.fr 



This message and any attachments (the "message") are confide...{{dropped}}

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] GDB under windows

2003-11-06 Thread Prof Brian D Ripley
It's in the rw-FAQ! That describes this as `fraught' with good reason.

On Thu, 6 Nov 2003, Marsland, John wrote:

> Does anybody have some simple instructions to get me going using the GNU
> debugger GDB under windows with R?
>
> The R Extensions manual mentions briefly debugging under unix, but I've seen
> seen GDB mention in the Bloodshed Dev C++ IDE so it should be possible to
> use it with R?
>
> Regards,
>
> John
>
> [Using R-1.8.0 under Windows NT 4.0]

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272860 (secr)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] import data troubles

2003-11-06 Thread STOLIAROFF VINCENT
HI R lovers,

I have been facing a petty trouble with datas' import :

I have a plain txt file (see attached file or the copy below) that I cannot
read either with scan or read.table


> scan(file="F:/Alt/HDG/Stoliaroff/Data/test.txt")
Error in scan(file = "F:/Alt/HDG/Stoliaroff/Data/test.txt") : 
"scan" expected a real, got "ÿþ6"

> read.table(file="F:/Alt/HDG/Stoliaroff/Data/test.txt")
V1
1  ÿþ6
2   \n
36
44
55
63
73
8   \n
96
10   4
11   5
12   3
13   3
14  \n
15   6
16   4
17   5
18   3
19   2
20  \n
21   6
22   4
23   5
24   3
25   2
26  \n
27 



My file is as simple as:

62.5000 47.5048 56.8500 36.4700 32.4500 
62.1500 47.0952 55.0500 35.5600 30.1500 
61.3300 45.2476 53.6500 34.8200 29.4900 
61.6600 46.2286 53.8500 35.2000 30.6400 
62. 47.3714 54.4400 35.1100 30.1600 
60.8500 46.7143 52.9900 34.4200 29.3400 
61.0900 46.4381 52.7600 33.9600 29.1000 


 <>   

Does anybody have an idea of the cause of my problem?

Besides, I'd like to know if there is a function for importing datas from
excel file? I cannot find one...

Thanks a lot for any help
Sorry for my poor english and the possible irrelevancy of my questions

Vincent



*
Ce message et toutes les pieces jointes (ci-apres le "message") sont
confidentiels et etablis a l'intention exclusive de ses destinataires.
Toute utilisation ou diffusion non autorisee est interdite. 
Tout message electronique est susceptible d'alteration. 
SG Asset Management et ses filiales declinent toute responsabilite au titre
de ce message s'il a ete altere, deforme ou falsifie.

Découvrez l'offre et les services de SG Asset Management sur le site
www.sgam.fr 



This message and any attachments (the "message") are confidential and
intended solely for the addressees.
Any unauthorised use or dissemination is prohibited. 
E-mails are susceptible to alteration.   
Neither SG Asset Management nor any of its subsidiaries or affiliates shall
be liable for the message if altered, changed or falsified. 

*



ÿþ62.500047.5048 56.8500 36.4700 
32.4500 

62.1500 47.0952 55.0500 35.5600 30.1500 

61.3300 45.2476 53.6500 34.8200 29.4900 

61.6600 46.2286 53.8500 35.2000 30.6400 

62.0000 47.3714 54.4400 35.1100 30.1600 

60.8500 46.7143 52.9900 34.4200 29.3400 

61.0900 46.4381 52.7600 33.9600 29.1000 

         __
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] GDB under windows

2003-11-06 Thread Marsland, John
Does anybody have some simple instructions to get me going using the GNU
debugger GDB under windows with R? 

The R Extensions manual mentions briefly debugging under unix, but I've seen
seen GDB mention in the Bloodshed Dev C++ IDE so it should be possible to
use it with R?

Regards,

John

[Using R-1.8.0 under Windows NT 4.0] 


** 
This is a commercial communication from Commerzbank AG.\ \ T...{{dropped}}

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] Contributing to the R Extensions documentation

2003-11-06 Thread Martin Maechler
> "Ross" == Ross Boylan <[EMAIL PROTECTED]>
> on Wed, 05 Nov 2003 12:31:28 -0800 writes:

Ross> On Wed, 2003-11-05 at 12:06, Prof Brian Ripley wrote:
>> A list is just a vector of type VECSXP.  There IS a
>> section called `Handling lists'.
>> 
>> I don't think the gap is in the `Writing R Extensions'
>> document, maybe in your reading of it.
>> 
Ross> That section discusses reading lists, not making them.

Ross> It also includes no explicit statement that the names
Ross> of list items are in the R_NamesSymbol attribute, nor
Ross> instructions on how to create the value that goes in
Ross> that attribute (i.e., it should be a character vector
Ross> and its elements made with mkChar()).  (I'm also not
Ross> sure how deep one needs to use PROTECT, though that's
Ross> a more general issue.)

Ross> There is no explicit statement that the elements of
Ross> the list are arbitrary SEXP's.

Ross> I also had the list[i] vs list[[i]] lurking in my
Ross> mind, wondering how that mapped to the C level
Ross> constructs.  That is less central.

Ross> I'm not saying the clues aren't there; after all, I
Ross> did work it out, I think correctly.  I am saying that
Ross> certain information would be better stated explicitly
Ross> rather than simply being open to inference from an
Ross> example.  And I am saying that an explicit example of
Ross> constructing and returning a list (with named members)
Ross> would be useful, since that's a common scenario.

I tend to agree.
I assume most people will read that manual electronically --- as
opposed to "on paper", because you can search quickly ---
and such a proposed addition would be quite helpful.

Alternatively, and sometimes even more usefully,
one could consider providing these more extended examples as
files (*.c, *.R, Makefile, .. or even better, as an R package
(with a vignette !) which would have an almost purely didactical
aim.   As an R package --- source only, no binaries! --- it had
the advantage of providing "provably" (via R CMD check) working
code.

Martin Maechler <[EMAIL PROTECTED]> http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum  LEO C16Leonhardstr. 27
ETH (Federal Inst. Technology)  8092 Zurich SWITZERLAND
phone: x-41-1-632-3408  fax: ...-1228   <><

>> On Wed, 5 Nov 2003, Ross Boylan wrote:
>> 
>> I thought there were some gaps in the R Extensions
>> document; in particular, I was left wondering how to
>> create a list.  I think a paragraph on it would be
>> useful.
>> 
>> I would be happy to contribute the paragraph, but I'm
>> not sure if there's interest or what the procedure is.
>> Can anyone advise me?
>> 
>> Though I was looking at the 1.7.0 version, I just
>> checked 1.8.0 and the relevant section seems the same.
>> 
>> My ulterior motive is to discover if my understanding
>> of lists is actually correct :)

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] Variable selection.

2003-11-06 Thread Sokratis Alikhanidi
  Dear colleagues,

Please point me out to a variable selection approach or package in the R environment.
I am particularly interesting in evolutionary/genetic algorithms for optimization of 
PLS and SVM models.

---
My knowledge is limited by the follows packages:

Package "Subselect" does not seem to be valid, because it handles with the 
correlation/covariance matrix only.
Therefore, is it applicable to linear models (am I right?).
Can it be used for the non-linear learning approaches? What is its area of application?

Package "gafit" can optimize only continuous parameters in a function, but not the 
feature selection.
---

I will be glad for any recommendations.

Thank you very much.

Sokratis Alikhanidi.

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] help with nomogram function

2003-11-06 Thread Ross Darnell

Frank Harrell wrote
 
> On Wed, 05 Nov 2003 09:22:34 +1000
> Ross Darnell <[EMAIL PROTECTED]> wrote:
> 
> > I have fitted a logistic regression model
> > 
> > > failed.lr2$call
> > lrm(formula = failed ~ Age + task2 + Age:task2, data = time.long, 
> > na.action = na.omit)
> 
> Use Age*task2 and omit na.action as na.omit is the default
> 
> > 
> > using the Design package functions and would like to generate a
> > nomogram from this model.
> > 
> > the datadist information is generated and stored in
> > 
> > > ddist
> > time.long$Age time.long$task2
> > Low:effect 45
> > Adjust to  56   both.foam
> > High:effect68
> > Low:prediction 21   both.foam
> > High:prediction80   right
> > Low20   both.foam
> > High   80   right
> 
> This looks most strange.  You did not include the original code but I
> suspect you had $ in a term.  $ should not appear in column headings
> above.  Design wants you to use data= or attach, and avoid $ in terms.
> 
> 
> > 
> > Values:
> > 
> > time.long$task2 : both.foam left right 
> > > 
> > 
> > The model fitted and then when I try the nomgram function
> > 
> > > nomogram(failed.lr2)
> > Error in value.chk(at, i, NA, -nint, Limval, type.range = "full") : 
> > variable Age does not have limits defined by datadist
> > > 
> > 
> > I get an error. The NA values in ddist seem to be the problem but I
> > don't understand the datadist information.
> > 

I tried using the data argument in datadist

> names(my.data)
[1] "subject" "Age" "failed"  "task"   
> ddist <- datadist(Age,task,data=my.data)
Error in datadist(Age, task, data = my.data) : 
Object "Age" not found


Strange.

Thanks
Ross Darnell


--

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] Reading JPG files within R

2003-11-06 Thread Paolo Sirabella
Dear R-listers,
I am an enthusiastic new to R and have the following simple (. I hope .)
problem:
I am searching a function that allows to import jpg files as matrices (n
x m x 3) i.e. n_pixels x m_pixels x 3_colors.
I have seen the pixmap library, but it seems able only to read BMP
pictures (and not all them .).
Can someone give me some suggestions ? 
Thank you in advance.
 
=
Paolo Sirabella
University of Rome "La Sapienza" - Rome - Italy
Dept. of Human Physiology and Pharmacology
Biophysiscs Group
=
 

[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] Number of Days

2003-11-06 Thread Prof Brian Ripley
?strptime
?as.POSIXct
?difftime

On Wed, 5 Nov 2003, umeno wrote:

> Hi everyone,
> 
> I have been trying to compute numbers of days between two dates as follows:
> 
> > x <- c("1jan1960", "2jan1960", "31mar1960", "30jul1960")
> > z <- format(x, "%d%b%Y")
> > ex <- c("1jan1961", "15jan1960", "21mar1975", "10jul1981")
> > ez <- format(ex, "%d%b%Y")
> > ez-z
> Error in ez - z : non-numeric argument to binary operator
> 
> As you may see, I am getting an error.  Can anyone tell me how I can convert z 
> and ez to numeric vectors, so that I can compute days between the 
> corresponding dates in these vectors?
> 
> thank you
> soyoko
> 
> __
> Ms. Soyoko Umeno
> Graduate Research Assitant for the Illinois-Missouri Biotechnology Alliance (IMBA) 
> at http://www.imba.missouri.edu/
> Ph.D. Student at the Department of Agricultural and Consumer Economics
> at the University of Illinois at Urbana-Champaign
> Office Phone: 217-333-3417 or 217-333-0364
> Fax: 217-244-4817
> Mailing Address: 1301 W. Gregory Dr. MC710, Urbana, IL 61801
> 
> __
> [EMAIL PROTECTED] mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> 
> 

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


Re: [R] building r-patch

2003-11-06 Thread Prof Brian Ripley
The first is more or less what you should expect.

On Wed, 5 Nov 2003, Vadim Ogranovich wrote:

> Hi,
>  
> I am building r-patch from the sources (rsync-ed today).
>  
> make check produced the following message:
>  
> running tests of Internet and socket functions
>   expect some differences
> make[3]: Entering directory `/usr/evahome/vograno/R/tests'
> running code in 'internet.R' ... OK
> comparing 'internet.Rout' to './internet.Rout.save' ...18c18
> < Content type `text/plain; charset=iso-8859-1' length 134991 bytes
> ---
> > Content type `text/plain; charset=iso-8859-1' length 124178 bytes
> 22,23c22,23
> < .. .. .. .
> < downloaded 131Kb
> ---
> > .. .. .
> > downloaded 121Kb
> 25c25
> < [1] 273
> ---
> > [1] 251
> 60,61d59
> < Error in url("  http://foo.bar";, "r") : unable to open
> connection
> < In addition: Warning message: 
> 62a61
> > Error in url("  http://foo.bar";, "r") : unable to open
> connection
> 365,370c364
> <  Login: root  Name: root
> < Directory: /root Shell: /bin/tcsh
> < Last login Wed Nov  5 13:34 (PST) on pts/1 from
> verdi.irisfinancial.com
> < New mail received Wed Nov  5 04:02 2003 (PST)
> <  Unread since Fri Oct 24 04:02 2003 (PDT )
> < No Plan.
> ---
> > Error in make.socket(host, port) : Socket not established
>  OK
> 
>  
>  
> I noticed that I had to expect some differences so my question is how to
> tell whether it's harmless or not?
>  
>  
> Other questions are related to building of recommended packages:
> * The src/library/Recommended directory was empty. Is it expected? 

No.  You forgot to run tools/rsync-recommended in the sources.

> If
> yes, how to download the entire bundle of recommended packages (I know I
> can get them one by one)? Is install.packaes() the recommended way?
> * make check tried to test MASS and survival (and failed because the
> packages were not there), but it didn't try to test the other
> recommended  packages. Why only these two?

It did not test those packages, it tried to make use of them.  make
check-all would have tested the recommended packages.

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help