Re: [R] signal handling

2005-08-13 Thread Paul Roebuck
On Fri, 12 Aug 2005, Paul Gilbert wrote: Omar Lakkis wrote: Is ther a signal handling model in R? similar to Perl's %SIG hash. I want to do fast clean up in my R code before exit when a kill signal is issued. I'm not sure about perl's signals, but Unix signals can be passed with

[R] retrieving large columns using RODBC

2005-08-13 Thread Tamas K Papp
Hi, I have a large table in Postgresql (result of an MCMC simulation, with 1 million rows) and I would like to retrive colums (correspond to variables) using RODBC. I have a column called index which is used to order rows. Unfortunately, sqlQuery can't return all the values from a column at

Re: [R] Help converting a function from S-Plus to R: family$weight

2005-08-13 Thread Prof Brian Ripley
I think a question about the S family() functions is best determined by reading the S(-PLUS) documentation. The weights component computes the working weights for the IWLS, unsurprisingly (and as stated by ?family.object). R has mu.eta to do that, the crucial line in R's glm.fit being w

[R] Penalized likelihood-ratio chi-squared statistic: L.R. model for Goodness of fit?

2005-08-13 Thread Jan Verbesselt
Dear R list, From the lrm() binary logistic model we derived the G2 value or the likelihood-ratio chi-squared statistic given as L.R. model, in the output of the lrm(). How can this value be penalized for non-linearity (we used splines in the lrm function)? lrm.iRVI - lrm(arson ~

[R] Including Fortran subrutines in a package

2005-08-13 Thread Aleš Žiberna
Hello! I am creating a packege and I would like to inclued some Fortrun subrutines. I have two questions. 1. Can I use free form fortan - compiles well usinf g77 -ffree-form. 2. Is it enough to place the .for files in scr folder? Thank you in advance for any help! Ales Ziberna P.S.: I am

[R] Problems runing R CMD check

2005-08-13 Thread Aleš Žiberna
Hello! I have a problem checking the package. Firstly, I do not know how to specify the package to check. I tied specify it by supplying the path and by runing the R CMD check in the directory of the package. In addition to that, I get an error bellow. Any suggestions on how to set TMPDIR

Re: [R] Problems runing R CMD check

2005-08-13 Thread Sean O'Riordain
hi! start - control panel - system - advanced - environmental variables probably better to be working in a directory with no spaces in the path... s/ On 13/08/05, Aleš Žiberna [EMAIL PROTECTED] wrote: Hello! I have a problem checking the package. Firstly, I do not know how to specify the

[R] simulate the data set having the same covariance matrix

2005-08-13 Thread Glazko, Galina
Dear list, I have the set of multidimensional vectors X1,.,Xn and I need to simulate the data set having the same covariance matrix, as for X1,.., Xn. Do someone know how it can be done in R? I appreciate your help. Best regards Galina __

Re: [R] need help

2005-08-13 Thread Jim Lemon
Weiwei Shi wrote: Hi, there: I think i need to re-phrase my question since last time I did not get any reply but i think the question is not that hard, probably i did not make the question clear: I want to find cases like 35, 90, 330, 330, 335 from the rest which look like 3, 3, 3, 3.2, 3.3 4,

Re: [R] Problems runing R CMD check

2005-08-13 Thread Prof Brian Ripley
Please do read the manuals before posting, as we ask in the posting guide. On Sat, 13 Aug 2005, [iso-8859-2] Alea }iberna wrote: I have a problem checking the package. Firstly, I do not know how to specify the package to check. I tied specify it by supplying the path and by runing the R CMD

Re: [R] simulate the data set having the same covariance matrix

2005-08-13 Thread Prof Brian Ripley
library(MASS) ?mvrnorm Note the 'empirical' argument. On Sat, 13 Aug 2005, Glazko, Galina wrote: I have the set of multidimensional vectors X1,.,Xn and I need to simulate the data set having the same covariance matrix, as for X1,.., Xn. Do someone know how it can be done in R? I

[R] How to make a lagged variable in panel data?

2005-08-13 Thread Ila Patnaik
Suppose we observe N individuals, for each of which we have a time-series. How do we correctly create a lagged value of the time-series variable? As an example, suppose I create: A - data.frame(year=rep(c(1980:1984),3), person= factor(sort(rep(1:3,5))),

[R] How to change the names in tone pitch column

2005-08-13 Thread Atte Tenkanen
Hi, I have a column (V4) in a midi event list which includes tone pitch names, i.e. A4, E4, C#4, A3...: compo[1:10,] V1 V2 V3 V4 V5 V6 V7 1 1 1 0 A4 96 2 0 2 1 1 0 E4 96 2 0 3 1 1 0 C#4 96 2 0 4 1 1 0 A3 96 2 0 5 1 3 0 B4 96 1 0 6 1 3 0 E4 96 1

Re: [R] Penalized likelihood-ratio chi-squared statistic: L.R. model for Goodness of fit?

2005-08-13 Thread Frank E Harrell Jr
Jan Verbesselt wrote: Dear R list, From the lrm() binary logistic model we derived the G2 value or the likelihood-ratio chi-squared statistic given as L.R. model, in the output of the lrm(). How can this value be penalized for non-linearity (we used splines in the lrm function)?

Re: [R] General expression of a unitary matrix

2005-08-13 Thread Spencer Graves
Google led me to http://mathworld.wolfram.com/SpecialUnitaryMatrix.html;, where I learned that a special unitary matrix U has det(U) = 1 in addition to the unitary matrix requirement that U %*% t(Conj(U)) == diag(dim(U)[1]). Thus, if U is a k x k unitary matrix

[R] tkinsert matrix - how to display a matrix with tcltk

2005-08-13 Thread Simone Gabbriellini
dear list, I have problems with tkinsert I need to display a matrix as a result of my function, but when I use tkinsert(txt, end, myMatrix, sep=\n) I simply obtain a string. I do: n-tclVar() tclObj(n)-matrix(data, ncol=lenght) tkinsert(txt, end, tclvalue(n), sep=\n) any hints? thank you in

Re: [R] help on cross hedge optimal hedge variance ratio

2005-08-13 Thread Spencer Graves
You have not told us what software you used to get the results you present. My first question is whether you are working with prices or log(prices)? If the former, I suggest you consider the latter; price changes tend to be much better behaved, more nearly normal, etc., on the log

[R] When I install from source, chmod not permitted

2005-08-13 Thread Michael Kubovy
How to fix: chmod: /Library/Frameworks/R.framework/Versions/2.1.1/Resources/ library/R.css: Operation not permitted Kindly cc me when replying to list. _ Professor Michael Kubovy University of Virginia Department of Psychology USPS: P.O.Box 400400

[R] Compilation failures: mgcv, spatstat, Matrix, cluster

2005-08-13 Thread Michael Kubovy
Please cc me when replying to the list. With Version 2.1.1 (2005-06-20) on Power Mac G5 running Mac OS X 10.4.2 (8C46): Some compilations work (e.g., MatchIt, RGraphics, Zelig), and some don't, e.g., mgcv, spatstat, and the following (Matrix, cluster): trying URL

Re: [R] converting a t statistic to r2

2005-08-13 Thread Spencer Graves
The formula R2 = t2/(df+t2) applies only if a single intercept and a single slope are estimate with simple linear regression in something like B~A or B~age, but not with interaction nor quadratic term in age. For further information, I just got 4 hits from 'RSiteSearch(R^2

[R] path analysis

2005-08-13 Thread SALAMERO BARO, MANUEL
Someone knows if it is possible to perform a path analysis with sem package (or any other) to explain a dependent *dichotomus* variable? Thanks, Manel Salamero __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help

[R] Problem with numeric variable

2005-08-13 Thread ftorrei2
Hello all, I posted a question some days ago without getting any answers, perhaps, as one of you kindly pointed out, because the question was not clearly stated. Let me reformulate it: In a frame, a column named C2 represents a numeric variable (checked with is.numeric(C2)). Some rows in the

Re: [R] How to change the names in tone pitch column

2005-08-13 Thread Atte Tenkanen
Thanks Phil! This is much more beautiful and elegant. And I learned 2 new R-functions, nchar and substr. -Atte Atte - Here's one way - there certainly are others: notes = 0:11 names(notes) = c(C,C#,D,D#,E,F,F#,G,G#,A,A#,B) pc = notes[substr(V4,1,nchar(V4) - 1)] names(pc) = NULL pcAb

[R] Lattice on Mac OS X Strip Labels

2005-08-13 Thread Jason Connor
Hi, I'm running R 1.9 on a Mac with OS X (v10.3.9). When I use the lattice package I never see text in the strip labels. The labels appear and I can change their color, size, etc., but no matter what I do, no text appears. When I run the same code on my Unix R, the strip labels appear no

[R] monte carlo simulations/lmer

2005-08-13 Thread Eduardo Leoni
Hi - I am doing some monte carlo simulations comparing bayesian (using Plummer's jags) and maximum likelihood (using lmer from package lme4 by Bates et al). I would like to know if there is a way I can flag nonconvergence and exceptions. Currently the simulations just stop and the output reads

Re: [R] path analysis

2005-08-13 Thread John Fox
Dear Manel, -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of SALAMERO BARO, MANUEL Sent: Saturday, August 13, 2005 2:02 PM To: r-help@stat.math.ethz.ch Subject: [R] path analysis Someone knows if it is possible to perform a path analysis with

Re: [R] monte carlo simulations/lmer

2005-08-13 Thread Rolf Turner
I think you want to use the function try(); see ?try. cheers, Rolf Turner [EMAIL PROTECTED] __ R-help@stat.math.ethz.ch mailing list

Re: [R] How to make a lagged variable in panel data?

2005-08-13 Thread Gabor Grothendieck
On 8/13/05, Ila Patnaik [EMAIL PROTECTED] wrote: Suppose we observe N individuals, for each of which we have a time-series. How do we correctly create a lagged value of the time-series variable? As an example, suppose I create: A - data.frame(year=rep(c(1980:1984),3),

[R] PCA problem in R

2005-08-13 Thread Alan Zhao
Dear all: When I have more variables than units, say a 195*10896 matrix which has 10896 variables and 195 samples. prcomp will give only 195 principal components. I checked in the help, but there is no explanation that why this happen. Can we get more than 195 PCs for this case? Thank you very

[R] Documents for LME4

2005-08-13 Thread Shige Song
Dear All, I want to fit a two-level cross-classified random effect poisson model using LME4. However, the documentation for this pacakge seems really thin. I have the NLME book, but there is not much about mixed generalized linear models. Any suggestions about where I should begin? Thanks! Best,