Re: [R] connecting RMySQL to and external server

2007-12-15 Thread Prof Brian Ripley
It is trivial with RODBC (I know that is not what you asked, but it is the solution we found first). For RMySQL, note first that the MySQL configuration file is consulted, so the default host is specified in the client section, which is like [client] port=3306 [mysql]

[R] Function built with segments

2007-12-15 Thread thierrydb
Hello, I'm new to R. If I have a set of 10 points (X(i), Y(i)), is there an elegant way to build a function y=f(x) that would be build out of the consecutive segments of X(j),Y(j) points (with X(j) sorted)? Thank you very much TDB -- View this message in context:

[R] garch function in tseries package

2007-12-15 Thread Kazuhiko SHINKI
I am wondering how to run 'garch' function of 'tseries' package in R2.6.1. I installed R2.3.1 and R2.6.1 in my PC (Windows XP Home) and run a following simple GARCH function in both versions: garch(dSP[1:300], order = c(1,1)) where 'dSP' is daily return series of a stock

[R] Array dimnames

2007-12-15 Thread dave mitchell
Dear all, Possibly a rudimentary question, however any help is greatly appreciated. I am sorting a large matrix into an array of dim(p(i),q,3). I put each entry into a corresponding matrix (1 of the 3) based on some criteria. I figure this will assist me in condensing code as I can loop through

[R] Truncated normal distribution

2007-12-15 Thread Ravi Longia
I am using TNORM - rtnorm to simulate from a truncated normal distribution. However, the current function available allows us to define the mean and SD of the non-truncated (original) distribution and then run the simulation. http://rss.acs.unt.edu/Rdoc/library/msm/html/tnorm.html I would

Re: [R] rcom close Excel problem

2007-12-15 Thread Gyula
First, you will likely have to use Ctrl-Alt-Delete - Task Manager - to kill the Excel processes. you could also try wb[[Saved]]-TRUE # trick Excel to think that the workbook is saved x$Quit() # close Excel rm(list=ls()) # remove all objects attached to environment Gyula On Dec 14, 11:58

Re: [R] Function built with segments

2007-12-15 Thread Martin Maechler
t == thierrydb [EMAIL PROTECTED] on Fri, 14 Dec 2007 07:19:56 -0800 (PST) writes: t Hello, t I'm new to R. If I have a set of 10 points (X(i), Y(i)), is there an elegant t way to build a function y=f(x) that would be build out of the consecutive t segments of X(j),Y(j)

Re: [R] calculating the number of days from dates

2007-12-15 Thread Martin Maechler
KK == Knut Krueger [EMAIL PROTECTED] on Sat, 15 Dec 2007 08:39:02 +0100 writes: KK Bob Green schrieb: dates - read.csv(c:\\dates.csv,header=T) dates v1 v2 1 12/12/1978 12/12/2005 2 23/01/1965 23/09/2001 3 24/12/2004 16/03/2007 4

[R] modify a data.frame within a function

2007-12-15 Thread Yuval Sapir
Hello all, I'm trying to modify a single column of a data frame to remove randomly half of the values. I want to do it within a function, but can not assign the modified column back into the data frame. It was easy and successful without a function, so I suspect the problem is the call of the

Re: [R] VARMA in R

2007-12-15 Thread creepa1982
Hey Giovanni, thanks a lot for the help. I tried out combining the two functions dlmModARMA and dlmMLE and it works. The only problem I have right now is this. When I pass on the information about the starting parameters (param) in the dlmMLE function I can only input one parameter vector.

Re: [R] garch function in tseries package

2007-12-15 Thread Prof Brian Ripley
This has been reported several times. I posted a workaround earlier this week: https://stat.ethz.ch/pipermail/r-help/2007-December/148290.html so your searching of the archives was not very thorough! Another workaround is to use rterm instead of Rgui. On Sat, 15 Dec 2007, Kazuhiko SHINKI

Re: [R] truncated fields with RODBC

2007-12-15 Thread Mikkel Grum
For the record, the problem with truncated fields below was solved by increasing the Max LongVarChar variable in the data source settings page 1 from 8190 to 32760. So it was a psqlODBC problem not an RODBC problem. The command nchar(Grids$Grids) helped me see how large the fields actually were

Re: [R] modify a data.frame within a function

2007-12-15 Thread Mark Wardle
You need to read about scope. Try using return() from within your function to return the modified data frame to the caller. Best wishes, Mark On 15/12/2007, Yuval Sapir [EMAIL PROTECTED] wrote: Hello all, I'm trying to modify a single column of a data frame to remove randomly half of the

[R] How to analyze observations list-wise deleted?

2007-12-15 Thread Chengshan Liu
I am using lrm in Design package for a project using logit analysis. I think lrm is very useful for providing information about the number of missing values due to the inclusion of each variable. My first questions is: How to explore those observations that are automatically deleted from the lrm?

Re: [R] garch function in tseries package

2007-12-15 Thread Prof Brian Ripley
On Sat, 15 Dec 2007, Prof Brian Ripley wrote: This has been reported several times. I posted a workaround earlier this week: https://stat.ethz.ch/pipermail/r-help/2007-December/148290.html The promised update, tseries_0.10-13.tar.gz, is on the CRAN master in source form. Expect a binary

[R] how to threshold a matrix

2007-12-15 Thread affy snp
Dear list, I have a matrix M (2500 rows and 9 columns). It looks like 2.2 0.1 2.63.6 .. 0.4 1.9 2.74.2.. 1.8 2.5 4.32.2... . If I want to do: (1) if M[i,j]=0.3, M[i,j]=1 (2) if M[i,j]=-0.3, M[i,j]=-1 (3) Otherwise, M[i,j]=0

Re: [R] how to threshold a matrix

2007-12-15 Thread Gabor Grothendieck
Try: (M = 0.3) - (M = 0.3) On Dec 15, 2007 10:56 AM, affy snp [EMAIL PROTECTED] wrote: Dear list, I have a matrix M (2500 rows and 9 columns). It looks like 2.2 0.1 2.63.6 .. 0.4 1.9 2.74.2.. 1.8 2.5 4.32.2... . If

Re: [R] connecting RMySQL to and external server

2007-12-15 Thread Adrian Dusa
Indeed, I noticed the host argument but the server demands an username and a password for the machine first, and only after that for the MySQL server. Those were the arguments I was looking for. I will study the RODBC package then, if it solves the problem. Thank you very much, Adrian On

Re: [R] connecting RMySQL to and external server

2007-12-15 Thread Prof Brian Ripley
On Sat, 15 Dec 2007, Adrian Dusa wrote: Indeed, I noticed the host argument but the server demands an username and a password for the machine first, But you said 'connect to', not 'log in to', so how were we to know that? and only after that for the MySQL server. Those were the arguments I

Re: [R] connecting RMySQL to and external server

2007-12-15 Thread Gabor Grothendieck
Use ssh forwarding to forward local port 3307 to remote port 3306 specifying the remote account and password. Then if you use local port 3306 you can access your local version of MySQL and if you use port 3307 you can access the remote version. There is some info on the MySQL site. First test

[R] X11 uses font size 25 although 28 was requested

2007-12-15 Thread Andre Jung
Hi, I'm not sure if the real English warning is the same. I translated it from German. R came up with the following message: --- Warning message: In title(main = sinc.exp) : X11 nutzt Schriftgröße 25 obwohl 28 angefordert war [engl.: X11 uses

Re: [R] connecting RMySQL to and external server

2007-12-15 Thread Adrian Dusa
On Saturday 15 December 2007, Prof Brian Ripley wrote: On Sat, 15 Dec 2007, Adrian Dusa wrote: Indeed, I noticed the host argument but the server demands an username and a password for the machine first, But you said 'connect to', not 'log in to', so how were we to know that? and only

Re: [R] Analyzing Publications from Pubmed via XML

2007-12-15 Thread David Winsemius
Farrel Buchinsky [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: On Dec 13, 2007 11:35 PM, Robert Gentleman [EMAIL PROTECTED] wrote: or just try looking in the annotate package from Bioconductor Yip. annotate seems to be the most streamlined way to do this. 1) How does one turn the

Re: [R] how to add an index to a vignette?

2007-12-15 Thread dankelley
Oh, I see. The answer is just to do as usual, e.g. as follows, and R CMD build simply takes care of it. code ... \usepackage{makeidx} \makeindex ... \begin{document} ... \index{something} ... \printindex \end{document} /code -- View this message in context:

Re: [R] connecting RMySQL to and external server

2007-12-15 Thread Adrian Dusa
On Saturday 15 December 2007, you wrote: Use ssh forwarding to forward local port 3307 to remote port 3306 specifying the remote account and password.  Then if you use local port 3306 you can access your local version of MySQL and if you use port 3307 you can access the remote version.   There

Re: [R] Array dimnames

2007-12-15 Thread Domenico Vistocco
dave mitchell wrote: Dear all, Possibly a rudimentary question, however any help is greatly appreciated. I am sorting a large matrix into an array of dim(p(i),q,3). I put each entry into a corresponding matrix (1 of the 3) based on some criteria. I figure this will assist me in condensing

Re: [R] Array dimnames

2007-12-15 Thread Domenico Vistocco
Sorry, there were mistakes in variable names... (I realized only after pressed the send button) Domenico Vistocco wrote: dave mitchell wrote: Dear all, Possibly a rudimentary question, however any help is greatly appreciated. I am sorting a large matrix into an array of dim(p(i),q,3).

Re: [R] train nnet

2007-12-15 Thread Manuel Castejón Limas
Dear Ilh I was planning to dedicate a few hours this christmas to improve the AMORE package. I would like to explore the possibilities of the openMP library and to programm a few more training algorithms. Right now the rbf extension is ready but under testing. I think that what you ask for

Re: [R] Rd files with unknown encoding?

2007-12-15 Thread Spencer Graves
Dear Prof. Ripley: Thanks very much. I did as you suggested, which I'll outline here to make it easier for anyone else who might have a similar problem: * Read the offending *.Rd file in R using 'readLines' * Applied 'iconv' to the character vector, following

Re: [R] Changing the origin in polar.plot in plotrix package

2007-12-15 Thread hadley wickham
Hi John, One alternative would be to use ggplot2 with a polar coordinate system: library(ggplot2) qplot(mpg, wt, data=mtcars) + coord_polar() qplot(mpg, wt, data=mtcars, ylim=c(3,4)) + coord_polar() etc. You can see more examples of polar coordinates at