Re: [R] Boxplot: quartiles/outliers

2007-02-12 Thread Petr Pikal
Hi as documentation does not say anything about changing quantile computation it seems to me that you have 2 options: 1. change source code 2. change values computed by boxplot.stats and do plotting with newly computed values by bxp see respective help pages and look at structure

Re: [R] setting a number of values to NA over a data.frame.

2007-02-12 Thread Gregor Gorjanc
Jim Lemon jim at bitwrit.com.au writes: Hi John, You might have a look at toNA in the prettyR package. Wait for version 1.0-4, just uploaded, as I have fixed a bug in that function. There is also a set of generic functions exactly for such cases: unknownToNA(), NAToUnknown() and isUnknown()

[R] SQL statements (directly) in R

2007-02-12 Thread christian.ritter
Hi R-users, This note will interest people who would like to use sql statements on R data frames (a bit like proc sql in SAS). Please reply to my only, unless you really want to keep the entire R-help list posted on this. I've been thinking about a packgage implementing sql queries in R. I'm

[R] How to get the polynomials out of poly()

2007-02-12 Thread Ernst O Ahlberg Helgee
Hi Folks! Im using the function poly to generate orthogonal polynomials, but Id like to see the actual polynomials so that I could convert it to a polynomial in my original variable. Is that possible and if so how do I do it? /E __

Re: [R] How to get the polynomials out of poly()

2007-02-12 Thread Prof Brian Ripley
plot(raw=TRUE) does this for you: there is little point in fitting by orthogonal polynomials and then converting back. As the help page says quite explicitly, poly() does not store the orthogonal polynomials: please also consult the reference it gives. It also points out that predict()

[R] Problem with kronecker and Matrix

2007-02-12 Thread Jarrod Hadfield
Hi, I'm trying to speed up some code by using the Matrix package. For most matrix manipulations I get a good increase in speed, however applying the kronecker function is orders of magnitude slower than with simple martix classes. In addition if I loop through kronecker products for

Re: [R] spss file import

2007-02-12 Thread Federico Calboli
Ndoye Souleymane wrote: Hi, Let me suggest you to save your spss file in txt and use the read.table function to load your file in R. That is what I use to do. The problem here is that the files are old data that were made with an ancient version of spss and cannot be changed to txt (or

Re: [R] setting a number of values to NA over a data.frame.

2007-02-12 Thread John Kane
--- Gregor Gorjanc [EMAIL PROTECTED] wrote: Jim Lemon jim at bitwrit.com.au writes: Hi John, You might have a look at toNA in the prettyR package. Wait for version 1.0-4, just uploaded, as I have fixed a bug in that function. There is also a set of generic functions exactly for

Re: [R] R in Industry

2007-02-12 Thread Duncan Murdoch
On 2/12/2007 2:50 AM, Patrick Connolly wrote: On Wed, 07-Feb-2007 at 07:07PM +1100, Jim Lemon wrote: | Matthew Keller wrote: | Far from flaming you, I think you made a good point - one that I | imagine most people who use R have come across. The name R is a big | impediment to

[R] Colouring the polygons, correlation matrix

2007-02-12 Thread Serguei Kaniovski
Hello, Below a modified function for displaying a correlation matrix by Vincent Zoonekynd posted in his excellent tutorial. Compared to the matrix and the legend, the colouring of the polygons is wrong. The error is in the sequence: col=col[N*(mat[i,j]+1)/2]. I cannot seem to devise a sequence

[R] lmer and estimation of p-values: error with mcmcpvalue()

2007-02-12 Thread Christoph Scherber
Dear all, I am currently analyzing count data from a hierarchical design, and I?ve tried to follow the suggestions for a correct estimation of p-values as discusssed at R-Wiki (http://wiki.r-project.org/rwiki/doku.php?id=guides:lmer-testss=lme%20and%20aov). However, I have the problem that my

Re: [R] lmer and estimation of p-values: error with mcmcpvalue()

2007-02-12 Thread Henric Nilsson (Public)
Den Må, 2007-02-12, 13:58 skrev Christoph Scherber: Dear all, I am currently analyzing count data from a hierarchical design, and I?ve tried to follow the suggestions for a correct estimation of p-values as discusssed at R-Wiki

[R] Duda Hart Index

2007-02-12 Thread GRAHAM LEASK
Is the Duda Hart clustering index available within R? If so I would greatly appreciate the script file. Many thanks Kind regards Dr Graham Leask Economics and Strategy Group Aston Business School Aston University Aston Triangle Birmingham B4 7ET Tel: Direct line 0121 204 3150

[R] V fold cross validation

2007-02-12 Thread GRAHAM LEASK
Does any package available in R contain the V-fold cross-validation method for determining the right number of clusters? Any help greatly appreciated Kind regards Dr Graham Leask Economics and Strategy Group Aston Business School Aston University Aston Triangle Birmingham B4 7ET Tel:

Re: [R] lmer and estimation of p-values: error with mcmcpvalue()

2007-02-12 Thread Christoph Scherber
Dear Henric, Thanks, now it works; but how reliable are these estimates? Especially with p-values close to 0.05 it is of course important that the range of the estimates is not too large. I´ve just run several simulations, each of which yielding sometimes quite different p-values. Best wishes

[R] Linking R with Microsoft SQL Server / Client

2007-02-12 Thread Steve Friedman
Hello My colleagues and I have recently established a large database (40 tables each with greater than 15 variables) in Microsoft's SQL Server 2000. Currently we are accessing this database via SQL client running an Windows XP. Our objectives are many fold including running SQL applications,

[R] job advertisement - finance - London based

2007-02-12 Thread john.gavin
Hi, We are looking for a skilled statistician/programmer seeking a career at the intersection of finance, applied statistics and computer science. This position requires a person with a strong background in - data analysis, - design and implementation of algorithms, - software development -

Re: [R] Linking R with Microsoft SQL Server / Client

2007-02-12 Thread Wensui Liu
steve, i think you can use R to link to sql server directly with RODBC. but it is not wise to dump the whole table from db into R and then do manipulation, which will slow the speed of R. On 2/12/07, Steve Friedman [EMAIL PROTECTED] wrote: Hello My colleagues and I have recently established a

Re: [R] Linking R with Microsoft SQL Server / Client

2007-02-12 Thread ONKELINX, Thierry
Dear Steve, Reading the data shouldn't be a problem with RODBC. I've been doing that plenty of times. I'm not sure about writing, but I suppose you probably will. Cheers, Thierry ir. Thierry Onkelinx Instituut voor

[R] Problem with factor state when subset()ing a data frame

2007-02-12 Thread Terry Therneau
The solution to most factors questions on the R mailing list is to set the global option stringsAsFactors to F. Make it your part of your default R startup. Even better, do what we have done at Mayo for the last 10+ years and make it the default for your whole unit. (150+ users, 20+ years of

Re: [R] SQL statements (directly) in R

2007-02-12 Thread Wensui Liu
chris, if you could create a package similar to proc sql in SAs, that will be so sweet. On 2/12/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi R-users, This note will interest people who would like to use sql statements on R data frames (a bit like proc sql in SAS). Please reply to my

[R] 'Save Workspace' gives recursive default argument reference -- workaround?

2007-02-12 Thread Ben Fairbank
When signing off R or trying to save a workspace in Windows XP pro SP2, I receive the following error message - save.image(C:\\Program Files\\R\\R-2.4.1\\Responses3.RData) Error in save.image(C:\\Program Files\\R\\R-2.4.1\\Responses3.RData) : recursive default argument reference

Re: [R] Trying to replicate error message in subset()

2007-02-12 Thread Michael Rennie
Okay First- I apologise for my poor use of terminology (error vs. warning). Second- thanks for pointing out what I hadn't noticed before- when I pass one case for selection to subset, I get all observations. When I pass two cases (as a vector), I get every second case for both cases (if both

Re: [R] Linking R with Microsoft SQL Server / Client

2007-02-12 Thread Bos, Roger
Yes, you can use RODBC to connect to MS SQL. You can query, issue commands, and save to the db from R and it works very well (at least for me). For example, with a database named xf, create an ODBC data source and then link open a connection in R: library(RODBC) xf - odbcConnect(xf, username,

[R] Width of a plotting point (in inches) in grid package

2007-02-12 Thread Randall C Johnson [Contr.]
Hello, I'm trying to determine the width of a plotting point (in inches) in the grid package. I naively thought I could create a pointsGrob with only one point and get the width (as tried below), but this results in an object with a size of 0inches (changing cex has no effect). Does anyone have a

[R] R and MS SQL Server

2007-02-12 Thread Steve Friedman
Greetings, I previously asked if I could link R to Microsoft Server / Client. The answer has been pouring in from around the world. The answer is Yes I'm now exploring RODBC and learning the ropes. Thanks to everyone who replied. -- Steve Friedman Computational Ecology and Visulation

[R] Handling large calculations and memory

2007-02-12 Thread Patrick Leoni
Dear All, I am planning to run a Monte-Carlo experiment which involves to do roughly 100.000 times the following 1- Generating a sample of, say, 50.000 numbers from an ARMA or GARCH 2- Doing some regressions on the series 3- On each regression storing one special value from the results into a

[R] predict on biglm class

2007-02-12 Thread Benilton Carvalho
Hi Everyone, I often use the 'safe prediction' feature available through glm(). Now, I'm at a situation where I must use biglm:::bigglm. ## begin example library(splines) library(biglm) ff - log(Volume)~ns(log(Girth), df=5) fit.glm - glm(ff, data=trees) fit.biglm - bigglm(ff, data=trees)

Re: [R] practical memory limits

2007-02-12 Thread Greg Snow
An old rule of thumb was that you should have 6 times as much memory as your dataset will take. But I think pretty much everything has been improved since then, so you should be able to get by with less (others may be able to give a better rule of thumb these days). You might want to look at the

Re: [R] Boxplot: quartiles/outliers

2007-02-12 Thread Greg Snow
For your outlier question, look at the 'range' argument to the boxplot function. It defaults to 1.5 meaning that any points more than 1.5*IQR from the 1st and 3rd quartiles are considered outliers. If you make this smaller, you will potentially see more outliers, if you make it larger then it

[R] Help neural network in R

2007-02-12 Thread vinod gullu
I am interested in Neural network models in R. Is there any reference material/tutorial which i can use. Regards, TV dinner still cooling? Check out Tonight's Picks on Yahoo! TV.

Re: [R] Help neural network in R

2007-02-12 Thread Wensui Liu
the one I will recommend is MASS by Dr B. Ripley. On 2/12/07, vinod gullu [EMAIL PROTECTED] wrote: I am interested in Neural network models in R. Is there any reference material/tutorial which i can use. Regards,

Re: [R] heatmap color specification

2007-02-12 Thread Xiaohui
Jim Lemon wrote: Xiaohui wrote: ... Then, I did a heatmap for 'test' matrix. But for now, I want to specify each of the cell in the heatmap according to the values of the corresponding matrix elements of test. Let's say: col-c(red,yellow,green) for test[1,1], the color on the map should

Re: [R] Help neural network in R

2007-02-12 Thread Christian Schulz
...maybe library(neural) with examples should a good staring point. regards, christian I am interested in Neural network models in R. Is there any reference material/tutorial which i can use. Regards,

[R] processing a large matrix

2007-02-12 Thread andy1983
I would like to compare every column in my matrix with every other column and get the r-squared. I tried using the following formula and looping through every column: summary(lm(matrix[,x]~matrix[,y]))$r.squared If I have 10,000 columns, the loops (10,000 * 10,000) take forever even if there is

Re: [R] Handling large calculations and memory

2007-02-12 Thread Bos, Roger
We don't know how much memory your computer has and how exactly you plan to generate these samples, so no one can really help you all that much. Its best for you to just code up what you want to do and find out if you get any memory errors or not. If you run into trouble and you can show us

Re: [R] processing a large matrix

2007-02-12 Thread Charles C. Berry
On Mon, 12 Feb 2007, andy1983 wrote: I would like to compare every column in my matrix with every other column and get the r-squared. I tried using the following formula and looping through every column: summary(lm(matrix[,x]~matrix[,y]))$r.squared If I have 10,000 columns, the loops

Re: [R] processing a large matrix

2007-02-12 Thread Greg Snow
One approach is to split up the work of doing the correlations, if you give the 'cor' function 2 matricies then it gives you the correlations between all pairs of columns. Since you said it works fine with 10,000 columns but not 30,000 you could split into 3 pieces and do something like

Re: [R] processing a large matrix

2007-02-12 Thread Greg Snow
Given the response by Carles Berry, you should probably really think about what you want to do with the results (I'm hoping that you do not plan to look at every R^2 value personally). For instance if you want to find which variable gives the highest R^2 value for each variable, then this

[R] help with tryCatch

2007-02-12 Thread Stephen Bond
Could smb please help with try-catch encapsulating a function for downloading. Let's say I have a character vector of symbols and want to download each one and surround by try and catch to be safe # get.hist.quote() is in library(tseries), but the question does not depend on it, I could be

[R] make check failure, internet.Rout.fail, Error in strsplit

2007-02-12 Thread Paul Lynch
I'm trying to build R on RedHat EL4. The compile went fine, but a make check ran into a problem and produced a file internet.Rout.fail. Judging by the last part of that file, it was trying to run an R routine called httpget to retrieve the URL

Re: [R] make check failure, internet.Rout.fail, Error in strsplit

2007-02-12 Thread Charilaos Skiadas
On Feb 12, 2007, at 6:28 PM, Paul Lynch wrote: I'm trying to build R on RedHat EL4. The compile went fine, but a make check ran into a problem and produced a file internet.Rout.fail. Judging by the last part of that file, it was trying to run an R routine called httpget to retrieve the URL

Re: [R] help with tryCatch

2007-02-12 Thread Henrik Bengtsson
See ?tryCatch. /Henrik On 2/12/07, Stephen Bond [EMAIL PROTECTED] wrote: Could smb please help with try-catch encapsulating a function for downloading. Let's say I have a character vector of symbols and want to download each one and surround by try and catch to be safe # get.hist.quote() is

[R] Can a data.frame column contain lists/arrays?

2007-02-12 Thread Christian Convey
I'd like to have a data.frame structured something like the following: d - data.frame ( x=list( c(1,2), c(5,2), c(9,1) ), y=c( 1, -1, -1) ) The reason is this: 'd' is the training data for a machine learning algorithm. d$x is the independent data, and d$y is the dependent data. In

[R] Really need help here

2007-02-12 Thread Tong Wang
Hi there, I had a serious problem here . Consider the following Bayesian model(discretized variance gamma): #Likelihood J[i]-lambda*G[i]+sigma*sqrt(G[i])*rnorm(0,1) G[i]-rgamma(1/nu,1/nu) #Prior: nu-rinvgamma(m,M) # Parameters lambda=-.04 ; sigam=.38; nu=6.48;

Re: [R] Can a data.frame column contain lists/arrays?

2007-02-12 Thread Christos Hatzis
Why do you need to use a data frame? A list will give you the flexibility you want: d - list( x=list( c(1,2), c(5,2), c(9,1) ), y=c( 1, -1, -1) ) Then you can access the individual elements d$x [[1]] [1] 1 2 [[2]] [1] 5 2 [[3]] [1] 9 1 d$y [1] 1 -1 -1 d$x[[1]] [1] 1 2 -Christos

[R] Rdonlp2 - an extension library for constrained optimization

2007-02-12 Thread Ryuich Tamura
Hello R-lists, I have created an extension library called Rdonlp2. This is a wrapper for Peter Spellucci's DONLP2: http://plato.la.asu.edu/donlp2.html DONLP2 is a standalone C program that can solve following minimization problem: min f(x) subject to * parameter bounds * linear (equality)

Re: [R] SQL statements (directly) in R

2007-02-12 Thread Gregor Gorjanc
Wensui Liu liuwensui at gmail.com writes: chris, if you could create a package similar to proc sql in SAs, that will be so sweet. Nice task, but I would not suggest to go this way. I found it quite easy to work with R subsetting system after you get some practice and that is more than

Re: [R] lmer and estimation of p-values: error with mcmcpvalue()

2007-02-12 Thread Gregor Gorjanc
Christoph Scherber Christoph.Scherber at agr.uni-goettingen.de writes: Dear Henric, Thanks, now it works; but how reliable are these estimates? Especially with p-values close to 0.05 it is of course important that the range of the estimates is not too large. I´ve just run several