Re: [R] ECB/Sidebar/R (Emacs) was: Re: kate editor for R

2007-01-23 Thread Gregor Gorjanc
Ramon Diaz-Uriarte rdiaz02 at gmail.com writes: I had looked at ECB for C++ programming. It simply hadn't occurred to me that it would plug into ESS. I wasn't aware of it either until I attended Tony Rossini's tutorial at useR! 2006. Are there any materials for those who missed the

Re: [R] sequential processing

2007-01-23 Thread Prof Brian Ripley
On Mon, 22 Jan 2007, Gerard Smits wrote: So, I take it, given that the use of a pipe is suggested for sequential reading, that the standard approach to processing a data frame is to load the entire file? Please correct if wrong. Yes, because most data frames are tiny compared to current RAM

Re: [R] why not to enclose in 'try' everything?

2007-01-23 Thread Vladimir Eremeev
fit-NULL try ( { fit - lm(y~x, data = data_fitting) coeffs - as.list(coef(fit)) ## other subsequent processes }, silent =TRUE) -- View this message in context:

Re: [R] the value of Delta

2007-01-23 Thread Christoph Buser
I have not installed the package siggenes, but from the manual on http://www.ugrad.stat.ubc.ca/R/library/siggenes/ I assume it is programmed as an S4 class since they use [EMAIL PROTECTED] instead of $ Hope this helps Christoph

[R] SARIMA with dynlm

2007-01-23 Thread yannig goude
Does anyone have an exemple of how to fit a SARIMA model , with a MA part, with the package dynlm? Best regards. - [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing

Re: [R] SARIMA with dynlm

2007-01-23 Thread Achim Zeileis
Yannig: Does anyone have an exemple of how to fit a SARIMA model , with a MA part, with the package dynlm? This is not yet possible. Currently, dynlm() just offers the functionality of lm() for time series data, i.e., OLS for auto-regressive models. I hope to interface arima() one day as well,

[R] Error in odfWeave

2007-01-23 Thread Rajdl Daniel
Dear R-experts, I have tried this command: #-- odfWeave(C:/Documents and Settings/rajdl/Dokumenty/zk/vstup.odt,C:/Documents and Settings/rajdl/Dokumenty/zk/vystupek.odt) #--- and the console output was: #-- Setting wd to

[R] Problem with ordered probit model in MASS

2007-01-23 Thread justin bem
Dear all, I got this message, while using the polr function in MASS EQ-as.formula(dep~fpta+tcdv+cdta+cmta+prcd+patc+lactifs+excta) Estim-polr(EQ,don, subset=(cote!=0),method=probit,na.action=na.omit) Error in polr(EQ, don, subset = (cote != 0), method = probit, na.action = na.omit) :

[R] Calling R function from C++ when C++ was not invoced by R, or Calling R from PL/SQL

2007-01-23 Thread Mucha
I have what many might consider a strange problem. I have about 250 lines of R code that I need to use in my system. (Need because I do not understand it enough to translate it to anything else). The final purpose is to use it from a PL/SQL function in Oracle 10g. The previous version of this

Re: [R] Question about rpart and regression trees

2007-01-23 Thread Paul Smith
On 1/23/07, Prof Brian Ripley [EMAIL PROTECTED] wrote: I would like to use rpart to obtain a regression tree for a dataset like the following: Y X1 X2 X3 X4 5.500033 B A 3 2 0.35625148D B 6 5 0.8062546 E C

[R] Scatterplot3d-proposal

2007-01-23 Thread Atte Tenkanen
Hi, Does somebody know if there is some trick to betoken the starting points (on the floor) of the vertical lines in scatterplot3d-plots. I'd prefer something like that one in the example here http://users.utu.fi/attenka/proposal3d.jpg If this is not possible, could this option be added?

[R] [R-pkgs] eval() parse() and problem with square brackets

2007-01-23 Thread Jakub Jurdziak
Hello, i have problem with the following code (I'm using sqlQuery function from RODBC package): eval(parse(text=g_1 - sqlQuery(cnn_1, \select aa from bb.[cc\\dd].ee\))). I get the error message: [RODBC] ERROR: Could not SQLExecDirect S0002 208 [Microsoft][ODBC SQL Server Driver][SQL

Re: [R] Repeated measures

2007-01-23 Thread Chuck Cleland
Richard Plant wrote: In the two solutions for the repeated measures problem given in the original reply below, the F and p values given by aov() with the error strata defined by Error() are different from those given by lme(). However, when one does the problem by hand using the standard split

Re: [R] Scatterplot3d-proposal

2007-01-23 Thread Duncan Murdoch
On 1/23/2007 6:38 AM, Atte Tenkanen wrote: Hi, Does somebody know if there is some trick to betoken the starting points (on the floor) of the vertical lines in scatterplot3d-plots. I'd prefer something like that one in the example here http://users.utu.fi/attenka/proposal3d.jpg If

Re: [R] Scatterplot3d-proposal

2007-01-23 Thread Uwe Ligges
Duncan Murdoch wrote: On 1/23/2007 6:38 AM, Atte Tenkanen wrote: Hi, Does somebody know if there is some trick to betoken the starting points (on the floor) of the vertical lines in scatterplot3d-plots. I'd prefer something like that one in the example here

[R] automated integration?

2007-01-23 Thread francogrex
When I run the script below it works well it ouputs the result that I need, in this case were n=45 and e=5.02689 the result is: 6.669578 --- dens-function(x){ n=45 e=5.02689 a1=0.0987 b1=0.04261 a2=1.043 b2=1.222 p=0.121 if (n200) c((n=n/2),(e=e/2))

Re: [R] RXvisua

2007-01-23 Thread Mahomet Hollowell
Good day, CIA_ALIS $3, 75 VAL_LIUM $1, 30 VIA_AGRA $3, 35 AMB_BIEN $2, 90 SO_MMA $1, 15 http://www.22rx*com ( Important! Replace * with . ) -- and Hermione sniping at each other over their homework in the common room that he took Siriuss food up to the Owlery that evening on his own.

[R] tapply and data.frame?

2007-01-23 Thread Zhang Jian
I want to transform the data by tapply to one dataframe. But I can not get it. For example: tst=tapply(point,pp,length) tst[1:10] p1 p10 p100 p1000 p1001 p1002 p1003 p1004 p1005 p1006 1 5 1 8 6 5 8 7 4 4 res=as.data.frame(tst) # I try to transform it res[1:10,] p1

Re: [R] Scatterplot3d-proposal

2007-01-23 Thread Atte Tenkanen
Duncan Murdoch wrote: On 1/23/2007 6:38 AM, Atte Tenkanen wrote: Hi, Does somebody know if there is some trick to betoken the starting points (on the floor) of the vertical lines in scatterplot3d-plots. I'd prefer something like that one in the example here

Re: [R] Scatterplot3d-proposal

2007-01-23 Thread Duncan Murdoch
On 1/23/2007 8:29 AM, Atte Tenkanen wrote: Duncan Murdoch wrote: On 1/23/2007 6:38 AM, Atte Tenkanen wrote: Hi, Does somebody know if there is some trick to betoken the starting points (on the floor) of the vertical lines in scatterplot3d-plots. I'd prefer something like that

Re: [R] tapply and data.frame?

2007-01-23 Thread jim holtman
Is this what you want: tst p1 p10 p100 p1000 p1001 p1002 p1003 p1004 p1005 p1006 1 5 1 8 6 5 8 7 4 4 data.frame(point=names(tst), ind=tst) point ind p1 p1 1 p10 p10 5 p100 p100 1 p1000 p1000 8 p1001 p1001 6 p1002 p1002

[R] Vector to Matrix transformation

2007-01-23 Thread Shubha Vishwanath Karanth
Hi R, I have a vector V1 of unknown length, say n. I need to convert this into a matrix C of row size=5, and accordingly the column should be updated. I tried with: C=as.matrix(V1,5,n/5) But it is not working...Could somebody help me on this? Thanks in advance...

Re: [R] Vector to Matrix transformation

2007-01-23 Thread Peter Dalgaard
Shubha Vishwanath Karanth wrote: Hi R, I have a vector V1 of unknown length, say n. I need to convert this into a matrix C of row size=5, and accordingly the column should be updated. I tried with: C=as.matrix(V1,5,n/5) But it is not working...Could somebody help me on this?

Re: [R] Vector to Matrix transformation

2007-01-23 Thread Dimitris Rizopoulos
check the help page for ?matrix(); you probably want either matrix(V1, nrow = 5) or matrix(V1, nrow = 5, byrow = TRUE) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer

Re: [R] Vector to Matrix transformation

2007-01-23 Thread Chuck Cleland
Shubha Vishwanath Karanth wrote: Hi R, I have a vector V1 of unknown length, say n. I need to convert this into a matrix C of row size=5, and accordingly the column should be updated. I tried with: C=as.matrix(V1,5,n/5) But it is not working...Could somebody help me on this? You

[R] Matrix operations in a list

2007-01-23 Thread Doran, Harold
I have matrices stored within a list like something as follows: a - list(matrix(rnorm(50), ncol=5), matrix(rnorm(50), ncol=5)) b - list(matrix(rnorm(50), nrow=5), matrix(rnorm(50), nrow=5)) I don't recall how to perform matrix multiplication on each list element such that the result is a new

[R] How to generate 'minor' ticks in lattice (qqmath)

2007-01-23 Thread Helmut Schütz
Dear group, I tried to generate labels for every second tick in lattice (qqmath). Version: 0.14-16 Date: 2006/12/01 R version 2.4.1 (2006-12-18) An example: library(lattice) numy=100 y=runif(numy,min=0,max=1) sig=0.05 numsig=length(which(ysig)) tck.no=11 # number of ticks tcks=1:tck.no

[R] Divergence or Singularity

2007-01-23 Thread nitin jindal
Hi, I am running a logistic regression model and then cross-validating it. But, 10-fold cross validation returns with following error message. Divergence or singularity in 5 samples Actually, I tried reading definition of divergence and singularity, but could not understand it in context of my

[R] how to write randomforest in r

2007-01-23 Thread myat wai
Dear Sir, I want to know how to do for getting the results. 1. data set is not in r. how to use my data set in r. 2. using randomForest function to build tree with my data set how to write for it 3. using this random forest how to predict the new data Please reply me.I want to bulid random forest

Re: [R] Matrix operations in a list

2007-01-23 Thread Marc Schwartz
On Tue, 2007-01-23 at 10:21 -0500, Doran, Harold wrote: I have matrices stored within a list like something as follows: a - list(matrix(rnorm(50), ncol=5), matrix(rnorm(50), ncol=5)) b - list(matrix(rnorm(50), nrow=5), matrix(rnorm(50), nrow=5)) I don't recall how to perform matrix

Re: [R] Matrix operations in a list

2007-01-23 Thread Dimitris Rizopoulos
you need the 'SIMPLIFY' argument of mapply(), i.e., mapply(%*%, a, b, SIMPLIFY = FALSE) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel:

Re: [R] How to generate 'minor' ticks in lattice (qqmath)

2007-01-23 Thread Gabor Grothendieck
Another approach is shown in the last example at the bottom of: library(zoo) ?xyplot.zoo On 1/23/07, Helmut Schütz [EMAIL PROTECTED] wrote: Dear group, I tried to generate labels for every second tick in lattice (qqmath). Version: 0.14-16 Date: 2006/12/01 R version 2.4.1 (2006-12-18) An

Re: [R] Matrix operations in a list

2007-01-23 Thread Christos Hatzis
Try, mapply('%*%', a, b, SIMPLIFY=FALSE) -Christos -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Doran, Harold Sent: Tuesday, January 23, 2007 10:22 AM To: r-help@stat.math.ethz.ch Subject: [R] Matrix operations in a list I have matrices stored

[R] eval() parse() and problem with square brackets

2007-01-23 Thread Jakub Jurdziak
Hello, i have problem with the following code (I'm using sqlQuery function from RODBC package): eval(parse(text=g_1 - sqlQuery(cnn_1, \select aa from bb.[cc\\dd].ee\))). I get the error message: [RODBC] ERROR: Could not SQLExecDirect S0002 208 [Microsoft][ODBC SQL Server Driver][SQL

[R] which classification package in R can assign sample weight?

2007-01-23 Thread Weiwei Shi
Hi, I am looking for some function implemented in R for classification, which has an option to allow me to assign sample weights in learning process? Implementation of a wrapper function is possible but I am curious if it already exists somewhere. Thanks, -- Weiwei Shi, Ph.D Research Scientist

Re: [R] eval() parse() and problem with square brackets

2007-01-23 Thread chao gai
I am just confused by the eval parse \ and such. what happens if simplify to : g_1 - sqlQuery(cnn_1, select aa from bb.[cc\\dd].ee) how would the query look in a native sql program? Cheers, Kees On Tuesday 23 January 2007 17:29, Jakub Jurdziak wrote: Hello, i have problem with the following

Re: [R] eval() parse() and problem with square brackets

2007-01-23 Thread Gabor Grothendieck
If the question is how to represent a character string containing double quotes without using \ then just use single quotes for the entire string instead: 'He said dog and she said cat.' On 1/23/07, chao gai [EMAIL PROTECTED] wrote: I am just confused by the eval parse \ and such. what happens

[R] Query about extracting subsets from a table

2007-01-23 Thread lalitha viswanath
Hi I am trying to process tabular data as follows: Data in the input file is of the form genome1 genome2 tree-dist log10escore Genome1 and genome2 are alphabetic. Tree-dist and log10escore are numeric. I wish to extract only those rows from this table where the log10escore is less than -3.

Re: [R] Query about extracting subsets from a table

2007-01-23 Thread Marc Schwartz
On Tue, 2007-01-23 at 09:28 -0800, lalitha viswanath wrote: Hi I am trying to process tabular data as follows: Data in the input file is of the form genome1 genome2 tree-dist log10escore Genome1 and genome2 are alphabetic. Tree-dist and log10escore are numeric. I wish to extract

Re: [R] Query about extracting subsets from a table

2007-01-23 Thread Chuck Cleland
lalitha viswanath wrote: Hi I am trying to process tabular data as follows: Data in the input file is of the form genome1 genome2 tree-dist log10escore Genome1 and genome2 are alphabetic. Tree-dist and log10escore are numeric. I wish to extract only those rows from this table

Re: [R] Query about extracting subsets from a table

2007-01-23 Thread jim holtman
Here is how you can do the extraction back to the original input: data - data[ data$log10escore -3, ] On 1/23/07, lalitha viswanath [EMAIL PROTECTED] wrote: Hi I am trying to process tabular data as follows: Data in the input file is of the form genome1 genome2 tree-dist log10escore

Re: [R] which classification package in R can assign sample weight?

2007-01-23 Thread Prof Brian Ripley
Almost all methods I know of do: logistic regression, neural nets, classification trees, PPR Have you looked at the help pages for any of these? On Tue, 23 Jan 2007, Weiwei Shi wrote: Hi, I am looking for some function implemented in R for classification, which has an option to allow

Re: [R] How to optimize this loop ?

2007-01-23 Thread Kaskelma, Heikki
Given a series of observations, I want to know how many consecutive past observations are below the last one. prune=function(m) { mr=rev(m) ms=cumsum(mr mr[1]) sum(seq_along(ms) - ms == 1) - 1 } prune(c(3, 4, 10, 14, 8, 3, 4, 8, 9)) # 4 prune(c(3, 4, 10, 14, 8, 3, 4, 11, 9)) # 0 Heikki

[R] cov.nnve error message

2007-01-23 Thread Talbot Katz
Hi. I have a data matrix of size 3072x1910. I can compute a standard 1910x1910 covariance matrix for this, and it comes out positive definite. I wanted to compute a robust covariance matrix with cov.nnve (in the covRobust library). It failed with the following error message: Error in

Re: [R] eval() parse() and problem with square brackets

2007-01-23 Thread Jakub Jurdziak
Hi, unfortunately I'm not able to check how it behaves at the moment. Even if it works ok, it is impossible to drop eval and parse in my situation. I’m using RExcel and RInterface.RRun to execute code from the string: g_1 - sqlQuery(cnn_1, select aa from bb.[cc\\dd].ee). RExcel adds eval and

Re: [R] which classification package in R can assign sample weight?

2007-01-23 Thread Weiwei Shi
Just checked ?lrm ?nnet ?rpart ?ppr thanks. but wondering if the last one can do classification? On 1/23/07, Prof Brian Ripley [EMAIL PROTECTED] wrote: Almost all methods I know of do: logistic regression, neural nets, classification trees, PPR Have you looked at the help pages for

[R] New lmer: How to recode random effect ?

2007-01-23 Thread jerome lemaitre
Dear all, I ran the following model without any problem previously to the update of lme4: fm2-lmer(data=NGud,family=poisson, seed~hab*seedtray +(1|site)+(1|site:hab)) I have 25 sites, 2 habitats (hab) per site, 8 seedtrays per habitat (4 as control, and 4 as treatment), and

Re: [R] eval() parse() and problem with square brackets

2007-01-23 Thread chao gai
Jakub, I was trying to simplify the situation in order to know where the fault happens. Appearently, from Excel, you go to R, which does some query in an MS application ? The square brackets now make me think that is Excel again, but I do not know. Had I known that I would not have touched

Re: [R] eval() parse() and problem with square brackets

2007-01-23 Thread Peter Dalgaard
Jakub Jurdziak wrote: Hi, unfortunately I'm not able to check how it behaves at the moment. Even if it works ok, it is impossible to drop eval and parse in my situation. I’m using RExcel and RInterface.RRun to execute code from the string: g_1 - sqlQuery(cnn_1, select aa from

[R] Question about functionality of sum()

2007-01-23 Thread Vince S. Buffalo
R community, My question is a bit complex to explain (and consequently difficult to search for in the archives). I will illustrate it with a simplified example. If I have an array of sample sizes for various factor levels, of all different sizes (due to missing data), and another array of those

Re: [R] Time-varying correlation calculation

2007-01-23 Thread Tim Hesterberg
You can do this using an interaction of bs(time) and x, e.g.: # Time-varying coefficient x - rnorm(100) time - ppoints(100) y - sin(time) + cos(time)*x + rnorm(100)/10 library(splines) fit - lm(y ~ bs(time, df=5) * x) fit # Plot estimated intercept vs time plot(time, coef(fit)[1] + bs(time,

Re: [R] eval() parse() and problem with square brackets

2007-01-23 Thread Jakub Jurdziak
RExcel and R (D)COM Server together allow you to write R commands in Excel, execute them in hidden instance of R and get results back to Excel. For more details - see http://sunsite.univie.ac.at/rcom/. The problem I have arises because R commands written in Excel are transformed before

[R] Installing packages...

2007-01-23 Thread Nüzhet Dalfes
Hi, I am a total newbie to R. I am using R (2.4.1) on Mac OS X 10.4.8 and trying to install some packages using GUI Packages Data/Package Installer interface... Every time I get: trying URL 'http://umfragen.sowi.uni-mainz.de/CRAN/bin/macosx/universal/contrib/2.4/neural_1.4.1.tgz' Content type

Re: [R] Installing packages...

2007-01-23 Thread Benilton Carvalho
well, i don't use RGui, but trying: install.packages(neural, type=source) ## from the R command line i could not reproduce the error (which may be a problem with the copy on the mirror you're using)... b On Jan 23, 2007, at 3:09 PM, Nüzhet Dalfes wrote: Hi, I am a total newbie to R. I am

[R] DSC 2007 Additional Funding

2007-01-23 Thread Paul Murrell
Hi DSC 2007, a conference on systems and environments for statistical computing, will take place in Auckland, New Zealand on February 15 16, 2007. *** Travel and Accommodation Support *** Additional NSF funding to provide partial support for travel and accommodation for graduate

Re: [R] Loess with more than 4 predictors / offsets

2007-01-23 Thread Louisell, Paul
In response to your questions: I asked about including the offset for convenience; I currently put the offset in by subtracting it from the response, just as you suggest. The reason for including them is that I'm doing something slightly unusual with loess: I'm fitting loess to

[R] vectorized nested loop: apply a function that takes two rows

2007-01-23 Thread Jose Quesada
Dear R users, I want to apply a function that takes two vectors as input to all pairs (combinations (nrow(X), 2))of matrix rows in a matrix. I know that ideally, one should avoid loops in R, but after reading the docs for do.call, apply, etc, I still don't know how to write the nested loop in a

[R] [fixed] vectorized nested loop: apply a function that takes two rows

2007-01-23 Thread Jose Quesada
(Extremely sorry, disregard previous email as I hit send before pasting the latest version of the example; this one is smaller too) Dear R users, I want to apply a function that takes two vectors as input to all pairs (combinations (nrow(X), 2))of matrix rows in a matrix. I know that ideally,

Re: [R] Installing packages...

2007-01-23 Thread İbrahim Mutlay
2007/1/23, Nüzhet Dalfes [EMAIL PROTECTED]: Hi, I am a total newbie to R. I am using R (2.4.1) on Mac OS X 10.4.8 and trying to install some packages using GUI Packages Data/Package Installer interface... Every time I get: trying URL '

Re: [R] Installing packages...

2007-01-23 Thread Weiwei Shi
why not just type in console: install.packages(neural) and see what happens. On 1/23/07, Nüzhet Dalfes [EMAIL PROTECTED] wrote: Hi, I am a total newbie to R. I am using R (2.4.1) on Mac OS X 10.4.8 and trying to install some packages using GUI Packages Data/Package Installer interface...

Re: [R] Loess with more than 4 predictors / offsets

2007-01-23 Thread Louisell, Paul
I apologize for clogging up inboxes, but I realized I needed to amend what I said in my last comment below: In fact, I'd like to specify that it be unconditionally linear, but with estimated coefficients, _both an intercept and a slope_. If the offset were only multiplied by a nonzero constant

Re: [R] Installing packages...

2007-01-23 Thread Ken Beath
On 24/01/2007, at 7:09 AM, Nüzhet Dalfes wrote: Hi, I am a total newbie to R. I am using R (2.4.1) on Mac OS X 10.4.8 and trying to install some packages using GUI Packages Data/Package Installer interface... Every time I get: trying URL

[R] total correlation

2007-01-23 Thread Weiwei Shi
Hi, there: I have an idea and it needs to calculate total correlation for a set of variables, because I need to evalate how cohesive or related a group of variables are (If someone knows other ways to do that, please be advised! thanks!). After searching the archives and googling, I just two

Re: [R] which classification package in R can assign sample weight?

2007-01-23 Thread Prof Brian Ripley
On Tue, 23 Jan 2007, Weiwei Shi wrote: Just checked ?lrm (I would use glm or multinom.) ?nnet ?rpart ?ppr thanks. but wondering if the last one can do classification? Yes, it has been so used since it can do multivariate outcomes. See Chapter 4 of my PRNN book, for example. On

Re: [R] [fixed] vectorized nested loop: apply a function that takes two rows

2007-01-23 Thread Charles C. Berry
I am rusty on 'Matrix', but I see there are crossprod methods for those classes. res - crossprod( x , x ) gives your result up to scale factors of sqrt(res[i,i]*res[j,j]), so something like diagnl - Diagonal( ncol(x), sqrt( diag( res ) ) final.res - diagnl %*% res

[R] Estimate and plot hazard function using muhaz package

2007-01-23 Thread Deming Mi
Dear R users, I am trying to use muhaz and plot.muhaz functions in muhaz package to estimate and plot hazard funciton. However function muhaz always gives error message Error in Surv(times, delta) : object times not found. I could not even run their sample codes in the user's manual as

Re: [R] Estimate and plot hazard function using muhaz package

2007-01-23 Thread Ken Beath
On 24/01/2007, at 10:34 AM, Deming Mi wrote: Dear R users, I am trying to use muhaz and plot.muhaz functions in muhaz package to estimate and plot hazard funciton. However function muhaz always gives error message Error in Surv(times, delta) : object times not found. I could not

Re: [R] RXdiscountenanc

2007-01-23 Thread Ilari Bausch
Good day, CIA_ALIS $3, 75 VAL_LIUM $1, 30 VIA_AGRA $3, 35 AMB_BIEN $2, 90 SO_MMA $1, 15 http://www.22rx*com ( Important! Replace * with . ) -- disturbed the water. Then, at long last, he heard a snatch of haunting mersong. An hour long youll have to look,

[R] package servers

2007-01-23 Thread Paul Gowder
Hi everyone... Here's a good one. I'm using the R installation for mac osx. An overly helpful friend tried to download a couple of packages for me (via the menu bar), and in the process, set my default package server. To a server that is not responding. I can't seem to get R to give me

Re: [R] package servers

2007-01-23 Thread Ken Beath
On 24/01/2007, at 12:03 PM, Paul Gowder wrote: Hi everyone... Here's a good one. I'm using the R installation for mac osx. An overly helpful friend tried to download a couple of packages for me (via the menu bar), and in the process, set my default package server. To a server that is not

Re: [R] package servers

2007-01-23 Thread Benilton Carvalho
go to R / Preferences / Startup than you'll know what to do when you see: Default CRAN mirror. b On Jan 23, 2007, at 8:03 PM, Paul Gowder wrote: Hi everyone... Here's a good one. I'm using the R installation for mac osx. An overly helpful friend tried to download a couple of packages for

Re: [R] [fixed] vectorized nested loop: apply a function that takes two rows

2007-01-23 Thread Charles C. Berry
On Tue, 23 Jan 2007, Charles C. Berry wrote: I am rusty on 'Matrix', but I see there are crossprod methods for those classes. res - crossprod( x , x ) gives your result up to scale factors of sqrt(res[i,i]*res[j,j]), so something like diagnl - Diagonal( ncol(x), sqrt( diag(

[R] writing R shell scripts?

2007-01-23 Thread Deepak Chandra
Hi All, Another newbie question. I want to write an R script that takes argument from command line and runs and produces output to stdin. For example if there is file foo.R with following in it. args = commandArgs() print(args) then, when I run it like $ R foo.R hello it should print 'hello'

Re: [R] Latin hyper cube sampling from expand.grid()

2007-01-23 Thread Rob Carnell
Prasanna prasannaprakash at gmail.com writes: Dear R experts I am looking for a package which gives me latin hyper cube samples from the grid of values produced from the command expand.grid. Any pointers to this issue might be very useful. Basically, I am doing the following:

Re: [R] writing R shell scripts?

2007-01-23 Thread Prof Brian Ripley
On Tue, 23 Jan 2007, Deepak Chandra wrote: Hi All, Another newbie question. I want to write an R script that takes argument from command line and runs and produces output to stdin. You will find that difficult: did you mean stdout? For example if there is file foo.R with following in it.

[R] solving a structural equation model using sem or other package

2007-01-23 Thread Daniel Nordlund
I am trying to work my way through the book Singer, JD and Willett, JB, Applied Longitudinal Data Analysis. Oxford University Press, 2003 using R. I have the SAS code and S-Plus code from the UCLA site (doesn't include chapter 8 or later problems). In chapter 8, there is a structural

[R] Matrix question: obtaining the square root of a positive definite matrix?

2007-01-23 Thread gallon li
I want to compute B=A^{1/2} such that B*B=A. For example a=matrix(c(1,.2,.2,.2,1,.2,.2,.2,1),ncol=3) so a [,1] [,2] [,3] [1,] 1.0 0.2 0.2 [2,] 0.2 1.0 0.2 [3,] 0.2 0.2 1.0 a%*%a [,1] [,2] [,3] [1,] 1.08 0.44 0.44 [2,] 0.44 1.08 0.44 [3,] 0.44 0.44 1.08 b=a%*%a i have