[R] Help With Fleiss Kappa

2009-07-13 Thread mehdi ebrahim
Hi All, I am using fleiss kappa for inter rater agreement. Are there any know issues with Fleiss kappa calculation in R? Even when I supply mock data with total agreement among the raters I do not get a kappa value of 1. instead I am getting negative values. I am using the irr package version

Re: [R] arr.lcol in plotmat from diagram package

2009-07-13 Thread Soetaert, Karline
Rajesh, A quick reply to your questions concerning the diagram package: To use different colors per arrow: just define arr.col as a Matrix or a data.frame, and give the color number or colorname to each arrow: To use numbers: M - matrix(nrow=4,ncol=4,data=0) M[2,1]-1

Re: [R] for (n in SystemResults$EnTime) return EnTime[n] until reaching (all)

2009-07-13 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 12.07.2009 22:24:29: On Sun, Jul 12, 2009 at 1:05 PM, David Winsemiusdwinsem...@comcast.net wrote: On Jul 12, 2009, at 3:35 PM, David Winsemius wrote: On Jul 12, 2009, at 2:53 PM, Mark Knecht wrote: As a test I tried to print down to

[R] simulation in multilevel model

2009-07-13 Thread Zoltan
Dear List Members, I am running a random intercept and random slope (2 cross-level interactions) MLM using package lme4 (individuals nested in countries, number of 2nd level units is 21). My DV (member of a trade union or not) is dichotomous, and thus it is a logistic multilevel model. The model

[R] Problems in plotting with abline

2009-07-13 Thread anupam sinha
Dear R-users, I am using R(a package igraph) to calculate certain topological features of networks. When I try to draw a plot between these features I get an error. Following is the code I am using : * plot(met_eco_deg,met_eco_bet) lmout-lm(met_eco_bet ~ met_eco_deg)

Re: [R] Problems in plotting with abline

2009-07-13 Thread anupam sinha
Thanks a million for your suggestion. It works. On Mon, Jul 13, 2009 at 2:29 PM, Alain Guillet alain.guil...@uclouvain.bewrote: Hello, The error message says there is no opened graphical windows. You cannot use abline if there is no open graphical windows. Try this:

[R] Odp: Problems in plotting with abline

2009-07-13 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 13.07.2009 10:45:50: Dear R-users, I am using R(a package igraph) to calculate certain topological features of networks. When I try to draw a plot between these features I get an error. Following is the code I am using : *

[R] Combine two matricies

2009-07-13 Thread Tom Liptrot
Hi, I have two matricies a and x: a-matrix(c(3,4,5,2,3,4,1,1,2), nrow=3, ncol=3) [,1] [,2] [,3] [1,]321 [2,]431 [3,]542 x-matrix(c(3, NA, NA, NA, 2, 5, NA, 2, 2), nrow=3, ncol=3) [,1] [,2] [,3] [1,]3 NA NA [2,] NA22 [3,] NA52

Re: [R] Combine two matricies

2009-07-13 Thread Dimitris Rizopoulos
try this: a - matrix(c(3,4,5,2,3,4,1,1,2), nrow=3, ncol=3) x - matrix(c(3, NA, NA, NA, 2, 5, NA, 2, 2), nrow=3, ncol=3) ind - is.na(x) x[ind] - a[ind] x I hope it helps. Best, Dimitris Tom Liptrot wrote: Hi, I have two matricies a and x: a-matrix(c(3,4,5,2,3,4,1,1,2), nrow=3, ncol=3)

Re: [R] Combine two matricies

2009-07-13 Thread Michael Knudsen
On Mon, Jul 13, 2009 at 11:31 AM, Tom Liptrot tomlipt...@hotmail.com wrote: I wish to combine these two into one matrix using the values from x where x has values, and values from a where x has NA's, giving a new matrix which would look like this: This should do the trick:

Re: [R] Combine two matricies

2009-07-13 Thread Paul Chatfield
The following code should do it. This assumes matrices a and x are of the same dimension which is why you can index a as below x[is.na(x)==TRUE]-a[is.na(x)==TRUE] -- View this message in context: http://www.nabble.com/Combine-two-matricies-tp24458609p24458797.html Sent from the R help

[R] Add grand mean to every entry in a matrix

2009-07-13 Thread Tom Liptrot
Hi, I have a matrix: mymat - matrix(runif(10*4), ncol=4) I wish to subtract the column means, down the colums, subtract the row means from the rows and add back the grand mean - all the means should be the means of mymat rather than of the new matrix. How can I do this? Any help much

[R] Odp: Combine two matricies

2009-07-13 Thread Petr PIKAL
Hi matrix is virtually a vector so you can find index of values of x and add those values to propper places in ax ax - a idx - which(!is.na(x)) ax[idx] - x[idx] ax [,1] [,2] [,3] [1,]321 [2,]422 [3,]552 Regards Petr r-help-boun...@r-project.org napsal

Re: [R] Add grand mean to every entry in a matrix

2009-07-13 Thread Gavin Simpson
On Mon, 2009-07-13 at 09:06 +, Tom Liptrot wrote: Hi, I have a matrix: mymat - matrix(runif(10*4), ncol=4) I wish to subtract the column means, down the colums, subtract the row means from the rows and add back the grand mean - all the means should be the means of mymat rather than

[R] How to perform a Likelihood-ratio test?

2009-07-13 Thread Lars Bergemann
Hi. I would like to use a likelihood-ratio test to compare a linear model (lm()) to another linear model containing the first one to see if the extra factors are needed - but I was unable to find any help on how to do that. Could you help me and tell me what to do? Or tell me where to find

[R] Bug in package.skeleton, R 2.9.0?

2009-07-13 Thread Daniel Klevebring
Dear all, I am using package.skeleton to build a small packages of misc function for personal use. I have recently discovered that the option force=TRUE doesn't seem to do what is meant to do. Here's what I'm doing: setwd(/Users/danielk/Documents/R/packages/dk) files - paste(codebase,

[R] pbc data

2009-07-13 Thread Λεωνίδας Μπαντής
Hi there, Can anyone please help me because I am going to get crazy with the pbc data set. I just want to apply simple cox regression in the data set. I am a beginner in R but I don't think I am doing anything wrong. I have the book of Fleming and Harrington 1990. I perform cox regression

[R] zero cells in one variable in logistic regression

2009-07-13 Thread anna.bucharova
Dear all. I am sort of beginner with R. I do logistic regression with binomial response variable and several continuous and categorical variables. In one categorical variable, zero cell occures (2x2 table looks like 7 - 0 23 - 25 This leads to overestimating of odds ratio and inflated

[R] Times series adjustment

2009-07-13 Thread Poizot Emmanuel
Dear all, I want make correction depth of a bathymetric data set. To do so, I have the depth data set sample every second (a depth at each second) in one hand, and in the other hand, I have a tide variation level data set sample every 250 ms. The time register in each data sets (tide and

Re: [R] zero cells in one variable in logistic regression

2009-07-13 Thread David Winsemius
On Jul 13, 2009, at 5:37 AM, anna.bucharova wrote: Dear all. I am sort of beginner with R. I do logistic regression with binomial response variable and several continuous and categorical variables. In one categorical variable, zero cell occures (2x2 table looks like 7 - 0 23 - 25 This

Re: [R] Times series adjustment

2009-07-13 Thread Gabor Grothendieck
Try this: # First read in the data using chron times class Lines.Bary - XY Date Time Depth -2.620748 48.75121 01/00/00 12:07:16.000 -25.6 -2.620714 48.75121 01/00/00 12:07:17.000 -25.8 -2.620698 48.75121 01/00/00 12:07:17.000 -26.0 -2.620682

[R] Partial Correlation

2009-07-13 Thread Moumita Das
Why do we get Partial correlation values greater than 1? I have used the default function pcor.mat :-- I have manipulated the default pcor.mat function a bit so ignore tha variables corr_type,element1_in_no,element2_in_no,P.Please ignore the “pairwise” section and have a look at athe “listwise

Re: [R] Splitting dataset for Tuning Parameter with Cross Validation

2009-07-13 Thread Tim
Seems to me if splitting once for all the bias will be big and if splitting once for each choice of parameters the variance ill be big. In LibSVM, for each choice of (c, gamma), the searching script grid.py calls svm_cross_validation() which has a random split of the dataset. So seems to

Re: [R] Help With Fleiss Kappa

2009-07-13 Thread David Freedman
If you apply the function to a simple dataframe or show your code, you might be able to get more accurate help. I've used the IRR package in the past and haven't noticed any problems (maybe I overlooked them ?) david freedman mehdi ebrahim wrote: Hi All, I am using fleiss kappa for inter

[R] Fliess Kappa

2009-07-13 Thread Sunita22
Hello Everyone I am calculating Fleiss Kappa, I have 28 raters, 5 Subjects and 5 ratings (i.e. A dataset with 28 columns and 5 rows). The problem is that there are 2 missing values in the data. (Right now I have manually deleted the values in csv file and then imported it in R 1) Would it

[R] R in rearranging equations

2009-07-13 Thread stenort
Hi, can anyone tell me if R can be used to rearrange very complicated equations in terms of one of the variables? I have: dx/dt = a*b*m*y*(1-x)-r*x and, having set: dy/dx = 0, need to rearrange in terms of x. The problem I have is that I don't know how to rearrange equations when the

[R] subset range selections

2009-07-13 Thread Mark Knecht
How would I write the two selections each in a single subset command? 1) Two non-overlapping time ranges I want to collect together - before 10AM and after noon. Should be an OR function: X = subset(A, t1000) + subset(A, t1200) 2) One range between two defined times like after 10AM and before

[R] Anomaly in sample() function

2009-07-13 Thread Wolfgang Polasek
Hi all Maybe someone knows a way to solve this anomaly in sample(): I like to compute a sample (n=100) with replications from a population of 2500 units but if I draw repeated samples from it I dont get what seems to be a representative sample if I look at other partitions of the population.

[R] 95% Confidence Intervals for AUC - $auc.samples from the Daim Package

2009-07-13 Thread lara harrup (IAH-P)
Hi I am trying to perform a bootstrap estimate of classification accuracy of a logistic regression using the 'Daim' package in r using the code at the bottom of this post, this all works great and I get the .632+ misclassification accuracy, specificity, sensitivity, AUC etc etc but what I

Re: [R] subset range selections

2009-07-13 Thread jim holtman
1) X - subset(A, (t 1000) | (t 1200)) 2) X - subset(A, (t 1000) (t 1200)) On Mon, Jul 13, 2009 at 9:47 AM, Mark Knechtmarkkne...@gmail.com wrote: How would I write the two selections each in a single subset command? 1) Two non-overlapping time ranges I want to collect together -

Re: [R] R in rearranging equations

2009-07-13 Thread Gabor Grothendieck
rSymPy and Ryacas can do algebraic manipulation. See http://rsympy.googlecode.com http://ryacas.googlecode.com library(rSymPy) Loading required package: rJava sympy(var('a b m r y x')) [1] (a, b, m, r, y, x) sympy(solve(a*b*m*y*(1-x)-r*x, x)) [1] [-a*b*m*y/(-r - a*b*m*y)] library(Ryacas) a

Re: [R] ?max (so far...)

2009-07-13 Thread Erich Neuwirth
Belated answer: A few remarks regarding your questions: Your running max problem could be solved in the following way: (which is a soution based o Duncan Murdoch's suggestion, but a little bit more general. foldOrbit-function(x,fun){ res-numeric(length(x)) res[1]-x[1]

Re: [R] Help With Fleiss Kappa

2009-07-13 Thread William Revelle
At 6:48 PM +1200 7/13/09, mehdi ebrahim wrote: Hi All, I am using fleiss kappa for inter rater agreement. Are there any know issues with Fleiss kappa calculation in R? Even when I supply mock data with total agreement among the raters I do not get a kappa value of 1. instead I am getting

Re: [R] zero cells in one variable in logistic regression

2009-07-13 Thread Vito Muggeo (UniPa)
dear anna, if you are not interested in point estimate and SE of the parameter of the aforementioned categorical variable, I believe the conventional glm(..,family=binomial) is correct. In particular, the returned deviance is reliable and also it is the relevant likelihood ratio test.. hope

Re: [R] Heckman Selection MOdel Help in R

2009-07-13 Thread Arne Henningsen
On Mon, Jul 13, 2009 at 11:18 AM, Pathak, Sauravs.patha...@imperial.ac.uk wrote: Dear Arne I have gone through the paper and I have tried it at my end, I would really appreciate if you could address the following: 1. Based upon your suggestion I used the following: regmod2 - selection(s ~

Re: [R] plm Issues

2009-07-13 Thread Damien Moore
Duh! Thanks and good advice. I was using 2.7.2 because it was, until recently, the latest version working with RPy (http://rpy.sourceforge.net/). Also didn't realize plm was still actively developed. Interesting that since plm now correctly handles diff and lag operations, it actually breaks with

Re: [R] variance explained by each predictor in GAM

2009-07-13 Thread Kayce Anderson
Many thanks for the advice David. I would really like to figure out, though, how to get the contribution of each factor to the Rsq - something like a Beta coefficient for GAM. Ideas? KC On Sun, Jul 12, 2009 at 5:41 PM, David Winsemius dwinsem...@comcast.netwrote: On Jul 12, 2009, at 5:06 PM,

[R] weighted cox ph model

2009-07-13 Thread Bessy
Dear all, I am struggling with the weighted Efron approximation. I really need some help. I am confused by the explanation regarding applying weights to Efron approximation on the paper of “A Package for Survival Analysis in S” (Terry M. Therneau, Feb 1999). In the section 3.3.7 Weighted Cox

Re: [R] subset range selections

2009-07-13 Thread Mark Knecht
Thanks Jim. How does one search the help system for info on simple logic like this? On Mon, Jul 13, 2009 at 6:59 AM, jim holtmanjholt...@gmail.com wrote: 1)   X - subset(A, (t 1000) | (t 1200)) 2)   X - subset(A, (t 1000) (t 1200)) On Mon, Jul 13, 2009 at 9:47 AM, Mark

Re: [R] plm Issues

2009-07-13 Thread Gabor Grothendieck
The dyn and dynlm packages can handle time series in lm and glm. (dyn can also handle many additional regression functions as well) In the case of dyn just write dyn$lm instead of lm like this: library(dyn) a - ts(c(1, 2, 4)) dyn$lm(a ~ diff(a)) Call: lm(formula = dyn(a ~ diff(a)))

Re: [R] subset range selections

2009-07-13 Thread jim holtman
You can find the operators with: ?| This will show you logical operators. You can do: ?+ to get the others. On Mon, Jul 13, 2009 at 10:21 AM, Mark Knechtmarkkne...@gmail.com wrote: Thanks Jim. How does one search the help system for info on simple logic like this? On Mon, Jul 13, 2009

Re: [R] Splitting dataset for Tuning Parameter with Cross Validation

2009-07-13 Thread Max Kuhn
Here is what the train() function in the caret package does by default (you can change this behavior; see below). Using the entire data set, estimate the RBF parameter using the sigest() function in the kernlab package (which, if I recall correctly involves the median of a sample of kernel matrix

Re: [R] Issues with file.info?

2009-07-13 Thread Jason Rupert
Yes. You are right that is the trick:) Here is what I'm seeing: input_path-c(C:/WINDOWS/system32) file.info(list.files(input_path)) size isdir mode mtime ctime atime exe $winnt$.inf NANA NA NA NA NA NA 1025 NANA NA NA NA NA NA ... xsi.jar NA NA NA NA NA NA NA

Re: [R] Nonlinear Least Squares nls() programming help

2009-07-13 Thread Dieter Menne
MathZero wrote: Hi, I am trying to use the nls() function to closely approximate a vector of values, colC and I'm running into trouble. I am not sure how if I am asking the program to do what I think its doing, because the same minimization in Excel's Solver does not run into problems.

[R] adjusting survival using coxph

2009-07-13 Thread Christopher Jones
I have what I *think* should be a simple problem in R, and hope someone might be able to help me. I'm working with cancer survival data, and would like to calculate adjusted survival figures based on the age of the patient and the tumour classification. A friendly statistician told me I

Re: [R] subset range selections

2009-07-13 Thread Duncan Murdoch
On 7/13/2009 10:21 AM, Mark Knecht wrote: Thanks Jim. How does one search the help system for info on simple logic like this? Look in the manuals (the pdf ones), rather than the man pages. For example, expressions like the ones below are in the Introduction to R, section 2.4, Logical

Re: [R] Issues with file.info?

2009-07-13 Thread Duncan Murdoch
On 7/13/2009 10:42 AM, Jason Rupert wrote: Yes. You are right that is the trick:) Here is what I'm seeing: input_path-c(C:/WINDOWS/system32) file.info(list.files(input_path)) size isdir mode mtime ctime atime exe $winnt$.inf NANA NA NA NA NA NA 1025 NANA NA NA

[R] math expressions in graphs

2009-07-13 Thread Rafael Moral
Dear useRs, I want to put a math expression in the ylab in my plot which should be a Delta and a 'y' with a trace and a hat above it and a 't' as subscription. How could I manage to do it? Thanks in advance, Regards, Rafael.

Re: [R] variance explained by each predictor in GAM

2009-07-13 Thread Simon Wood
You can get some idea by doing something like the following, which compares the r^2 for models b and b2, i.e. with and without s(x2). It keeps the smoothing parameters fixed for the comparison. (s(x,fx=TRUE) removes penalization altogether btw, which is not what was wanted). dat -

Re: [R] variance explained by each predictor in GAM

2009-07-13 Thread David Winsemius
It appears you are conflating beta coefficients (individual covariate effect measures) with overall model fit measures. Beta coefficients are not directly comparable to R-squared measures in ordinary least squares analyses, so why would they be so in gam models? I cannot tell whether you

Re: [R] object .trPaths not found

2009-07-13 Thread Knut Krueger
Uwe Ligges schrieb: I have to admit that I have no idea what we are talking about here (yes, I tend to forget many things these days) - and you have not cited the original message, unfortunately (nor have you specifies R versions, Tinn-R versions and both OS versions, but just one) ...

Re: [R] math expressions in graphs

2009-07-13 Thread Jorge Ivan Velez
Dear Rafael, Try the following which seems to be close to what you asked for: plot(1, ylab = expression( Delta ~ hat(y) [t] ) ) HTH, Jorge On Mon, Jul 13, 2009 at 10:56 AM, Rafael Moral rafa_moral2...@yahoo.com.brwrote: Dear useRs, I want to put a math expression in the ylab in my plot

[R] Lattice xyplot: same scales within one factor

2009-07-13 Thread OB
I am using R 2.8.1 and lattice to produce xyplots conditioned on two factors. What I would like is to have the scales be free between values of one factor, but some within. Thus, in this example, xyplot(mpg ~ disp | factor(gear) + factor(cyl), mtcars,     scales=list(x=list(relation=free)))

[R] dse model setup help

2009-07-13 Thread Bob McCall
I tried to specify a model in dse1 but something isn't right. Anybody have any tips? model-SS(F=f,G=g,H=h,Q=q,z0=z,P0=p) Error in locateSS(model$R, constants$R, R, p, p, plist) : The dimension of something in the SS model structure is bad. dim(f) [1] 5 5 dim(g) [1] 5 1 dim(h) [1] 1 5

[R] survSplit with data.frame containing a Surv object

2009-07-13 Thread Heinz Tuechler
Dear All, since years I am struggling with Surv objects in data.frames. The following seems to have to do with it. See below the modified example from the help page of survSplit. The original works, as expected. If, however, a Surv object is added to the data.frame, each record gets doubled.

Re: [R] variance explained by each predictor in GAM

2009-07-13 Thread Kayce Anderson
Simon,That produced exactly what I was looking for. Thanks so much for the humble help. KC On Mon, Jul 13, 2009 at 9:10 AM, Simon Wood s.w...@bath.ac.uk wrote: You can get some idea by doing something like the following, which compares the r^2 for models b and b2, i.e. with and without

Re: [R] How to perform a Likelihood-ratio test?

2009-07-13 Thread Jeff Xu
Hi Lars, Using the definition of Likelihood-ratio test is straightforward, Jeff Lars Bergemann wrote: Hi. I would like to use a likelihood-ratio test to compare a linear model (lm()) to another linear model containing the first one to see if the extra factors are needed - but I

[R] graph: axis label font

2009-07-13 Thread serbring
Hi, excuse me for my english, i am using R on windows and i have to do several graphs with axis labels and the axis text thicks has a specified font type, (Arial) and a specified font size. How can i do these? Thank you in advance -- View this message in context:

Re: [R] getting a timeseries element into a string

2009-07-13 Thread tradenet
Thanks Ron. I apologize for not properly specifying which class/package I was using. I am using the timeSeries class from the timeSeries Package, version 2100.83 from rmetrics.org The code you supplied works for me! -- thanks again. Warm regards, Andrew -- Ron Burns-2 wrote: Here is

Re: [R] How to perform a Likelihood-ratio test?

2009-07-13 Thread Emmanuel Charpentier
Le lundi 13 juillet 2009 à 13:04 +0200, Lars Bergemann a écrit : Hi. I would like to use a likelihood-ratio test to compare a linear model (lm()) to another linear model containing the first one to see if the extra factors are needed - but I was unable to find any help on how to do

Re: [R] How to perform a Likelihood-ratio test?

2009-07-13 Thread Charles C. Berry
On Mon, 13 Jul 2009, Jeff Xu wrote: Hi Lars, Using the definition of Likelihood-ratio test is straightforward, To which I would add, following the instructions in the _posting guide_ is equally straightforward. viz help.search(loglikelihood) takes you to

Re: [R] How to perform a Likelihood-ratio test?

2009-07-13 Thread Jorge Ivan Velez
Dear Lars, One way would be anova(model1, model2) See ?anova for more information. HTH, Jorge On Mon, Jul 13, 2009 at 7:04 AM, Lars Bergemann lars.bergem...@hotmail.comwrote: Hi. I would like to use a likelihood-ratio test to compare a linear model (lm()) to another linear model

[R] Help me get this function to work...

2009-07-13 Thread Chip Maney
I have a function (see below). This function has one object, ID. If I run the loops by itself using a character value (ie,VFFF1-7), then the loops work fine. However, when I try to insert the character value via the function call, it doesn't work. I don't get an error, but the TotalCover.df

[R] read.delim skips first column (why?)

2009-07-13 Thread Giovanni Marco Dall'Olio
Hi people, I have a text file like this one posted: snp_id genechromosome distance_from_gene_center positionpop1pop2pop3pop4pop5pop6pop7 rs2129081 RAPT2 3 -129993 upstream 0.439009 1.169210NA 0.2330200.093042

Re: [R] graph: axis label font

2009-07-13 Thread Michael Knudsen
On Mon, Jul 13, 2009 at 5:31 PM, serbringbracard...@email.it wrote: excuse me for my english, i am using R on windows and i have to do several graphs with axis labels and the axis text thicks has a specified font type, (Arial) and a specified font size. How can i do these? Thank you in advance

[R] Help get this simple function to work...

2009-07-13 Thread chipmaney
I have a function (see below). This function has one object, ID. If I run the loops by themselves using a character value (ie,VFFF1-7) instead of the function object, then the loops work fine. However, when I try to insert the character value via the function call, it doesn't work. I don't get

Re: [R] survSplit with data.frame containing a Surv object

2009-07-13 Thread Charles C. Berry
On Mon, 13 Jul 2009, Heinz Tuechler wrote: Dear All, since years I am struggling with Surv objects in data.frames. The following seems to have to do with it. See below the modified example from the help page of survSplit. The original works, as expected. If, however, a Surv object is added

Re: [R] Help me get this function to work...

2009-07-13 Thread David Winsemius
In R a function only returns the last evaluation, so you need to wrap up all of the local results into a list at the end of the function. On Jul 13, 2009, at 1:23 PM, Chip Maney wrote: I have a function (see below). This function has one object, ID. If I run the loops by itself using a

[R] how to run a R program with input arguments

2009-07-13 Thread edisonying
I am a beginner in R and know only a little about it yet. I have a script written in R language, named as a.txt for example. I am using a Linux machine, at present I only know that I can type R in the terminal and then copy-paste the content in a.txt to the R's interface to execute the program.

Re: [R] object .trPaths not found

2009-07-13 Thread Thomas Petzoldt
Hi, using a variable named .trPaths is a feature and a frequent nuisance of recent Tinn-R and also explained in the Tinn-R docs. Solution 1: In Tinn-R select the menu: R -- Configure -- and then Temporarily or Permanent Solution 2: Manually edit file

Re: [R] Help me get this function to work...

2009-07-13 Thread Mark Knecht
On Mon, Jul 13, 2009 at 12:08 PM, David Winsemiusdwinsem...@comcast.net wrote: In R a function only returns the last evaluation, so you need to wrap up all of the local results into a list at the end of the function. SNIP David Winsemius, MD Heritage Laboratories West Hartford, CT How

Re: [R] how to run a R program with input arguments

2009-07-13 Thread Henrique Dallazuanna
See commandArgs() function. On Mon, Jul 13, 2009 at 4:15 PM, edisonying edisonying1...@gmail.comwrote: I am a beginner in R and know only a little about it yet. I have a script written in R language, named as a.txt for example. I am using a Linux machine, at present I only know that I can

Re: [R] \dQuote in packages

2009-07-13 Thread Rebecca Sela
Thank you! (That was easy to fix.) How does one deal with quoting (in \reference)? The following line causes problems: \references{Sela, Rebecca J., and Simonoff, Jeffrey S., \dQuote{RE-EM Trees: A New Data Mining Approach for Longitudinal Data}.} The error given is: Warning in

[R] .RData signature

2009-07-13 Thread stenka1
Is there a way to identify the beginning and end of an .RData file? I am trying to restore lost files on opensolaris where the table of contents is overwritten and will be reading the raw disk byte by byte. I looked at several files in hex and the end seems different, while most of

Re: [R] error: optim(rho, n2ll.rho, method = method, control = control, beta = parm$beta, : initial value in 'vmmin' is not finite

2009-07-13 Thread Ravi Varadhan
Hi Brandy, The `vmmin' refers to a variable metric algorithm, which is a quasi-Newton method for optimization. This algorithm is used when `method=BFGS' in the optim() call. The quasi-Newton methods iteratively build an approopriate Hessian matrix, which is of dimension p x p, where p is the

[R] regression with replication

2009-07-13 Thread Agus Susanto
Dear all, I would like to fit a linear regression with replication (on each year, observation is replicated, e.g 4 times). The independent variable ranges for instance 1-5 year, so I expect to have a linear fit of 5 points. For that purpose I do these (with dummy variables x and y):

Re: [R] Help me get this function to work...

2009-07-13 Thread Bert Gunter
How important it is to wrap the list in a return statement, ala return(list(ShrubCover.df, TreeCover.df, TotalCover.df)) or answer - list(ShrubCover.df, TreeCover.df, TotalCover.df) return(answer) --- Completely Un. Consult the R Docs, especially the R Language Definition manual, for answers

[R] testing equality of two dependent correlations + normality issue

2009-07-13 Thread Jaroslav Hlinka
Hi, I am turning to you with a (hopefully simple?) stats question. I would like to test equality of two correlation coefficients in a setting with three variables X,Y,Z, i.e. equality of r(X,Y) and r(Z,Y). I have found a formula to transform the 2 dependent correlations difference to

[R] re ference

2009-07-13 Thread Derek Lacoursiere
Hello R users, I have developed code in R that generates populations of non-overlapping random polygons (polygonal maps) for testing certain stereological estimation methods. I have tried to look for articles or papers online on the generation of random polygonal maps and have found very

[R] Reducing arrays for comparison with each other...

2009-07-13 Thread Mark Knecht
Hi, First up, thanks again for all the help I'm getting on this list. I'm making great headway in analyzing my experimental data on an experiment by experiment basis. No way I could have done this in the time I've done it without your help. This email is partially a question about R but is

Re: [R] Help me get this function to work...

2009-07-13 Thread Duncan Murdoch
On 7/13/2009 3:21 PM, Mark Knecht wrote: On Mon, Jul 13, 2009 at 12:08 PM, David Winsemiusdwinsem...@comcast.net wrote: In R a function only returns the last evaluation, so you need to wrap up all of the local results into a list at the end of the function. SNIP David Winsemius, MD

[R] SweaveListingUtils question

2009-07-13 Thread Karsten Weinert
Hello, recently I read about the SweaveListingUtils package and now I want to try it out. However, I can not make it work... Below a minimal example. The problem seems to be the following line (generated by SweaveListingPreparations()?):

Re: [R] .RData signature

2009-07-13 Thread Duncan Murdoch
On 7/13/2009 3:38 PM, sten...@go.com wrote: Is there a way to identify the beginning and end of an .RData file? I am trying to restore lost files on opensolaris where the table of contents is overwritten and will be reading the raw disk byte by byte. I looked at several files in hex

Re: [R] \dQuote in packages

2009-07-13 Thread Duncan Murdoch
On 7/13/2009 3:27 PM, Rebecca Sela wrote: Thank you! (That was easy to fix.) How does one deal with quoting (in \reference)? The following line causes problems: \references{Sela, Rebecca J., and Simonoff, Jeffrey S., \dQuote{RE-EM Trees: A New Data Mining Approach for Longitudinal Data}.}

Re: [R] object .trPaths not found

2009-07-13 Thread Knut Krueger
Thomas Petzoldt schrieb: Hi, using a variable named .trPaths is a feature and a frequent nuisance of recent Tinn-R and also explained in the Tinn-R docs. Solution 1: In Tinn-R select the menu: R -- Configure -- and then Temporarily or Permanent Solution 2: Manually edit file

Re: [R] survSplit with data.frame containing a Surv object

2009-07-13 Thread Heinz Tuechler
At 20:18 13.07.2009, Charles C. Berry wrote: On Mon, 13 Jul 2009, Heinz Tuechler wrote: Dear All, since years I am struggling with Surv objects in data.frames. The following seems to have to do with it. See below the modified example from the help page of survSplit. The original works, as

Re: [R] Help get this simple function to work...

2009-07-13 Thread jim holtman
Your basic problem is that you are trying to change the value of a global object (TotalCover.df) from within a function. A better approach is to pass in the object that you are changing and then return it as the value of the function. You can then assign it back to the original object if you

Re: [R] re gression with replication

2009-07-13 Thread Ben Bolker
AgusSusanto wrote: Dear all, I would like to fit a linear regression with replication (on each year, observation is replicated, e.g 4 times). The independent variable ranges for instance 1-5 year, so I expect to have a linear fit of 5 points. For that purpose I do these (with dummy

Re: [R] survSplit with data.frame containing a Surv object

2009-07-13 Thread Charles C. Berry
On Mon, 13 Jul 2009, Heinz Tuechler wrote: At 20:18 13.07.2009, Charles C. Berry wrote: On Mon, 13 Jul 2009, Heinz Tuechler wrote: Dear All, since years I am struggling with Surv objects in data.frames. The following seems to have to do with it. See below the modified example from the

Re: [R] survSplit with data.frame containing a Surv object

2009-07-13 Thread Charles C. Berry
On Mon, 13 Jul 2009, Charles C. Berry wrote: On Mon, 13 Jul 2009, Heinz Tuechler wrote: At 20:18 13.07.2009, Charles C. Berry wrote: On Mon, 13 Jul 2009, Heinz Tuechler wrote: Dear All, since years I am struggling with Surv objects in data.frames. The following seems to have

Re: [R] nls, reach limit bounds

2009-07-13 Thread Ravi Varadhan
Hi Uyen, You do not have enough information to estimate 4 parameters in your nonlinear model. Even though you have 12 data points, only 6 are contributing independent information (you essentially have 6 replicate points). If you plot the fittted function you will see that it fits your data

Re: [R] How to combine two rows (in a dataframe) into a third row?

2009-07-13 Thread Mark Na
Hi Henrique other R-helpers, Thank you for helping me last week. I used Henrique's suggestion to develop some code (below) to combine two rows in my dataframe into a third row, and then delete the original two rows. It works well. My solution is not very elegant however; if there's a function

[R] Fortran function for quantiles

2009-07-13 Thread DHIMAN BHADRA
Hi, I was wondering whether there is any Fortran function or associated library for evaluating the quantiles of a set of values (something which the R-function quantile() does). Any help will be much appreciated. Thanks and regards, Dhiman Bhadra [[alternative HTML version deleted]]

Re: [R] Heckman Selection MOdel Help in R

2009-07-13 Thread Arne Henningsen
On Mon, Jul 13, 2009 at 4:26 PM, saurav pathakpathak.sau...@gmail.com wrote: I am using R 2.9.1, That's good! I am not sure about the version of sampleSelection and maxLik This is important! Please check the version numbers, e.g. with R help(package=maxLik) R help(package=sampleSelection)

[R] Rgraphviz ignoring outputorder attribute

2009-07-13 Thread Murat Tasan
Hi - since Rgraphviz was officially moved over to Bioconductor, this might be a misguided post, but it's worth a shot: I'm plotting a graph using Rgraphviz and in an attempt to force the edges to be behind the nodes (on a fairly complex graph), I set the outputorder graph attribute to edgesfirst

Re: [R] how to run a R program with input arguments

2009-07-13 Thread cls59
edisonying wrote: I am a beginner in R and know only a little about it yet. I have a script written in R language, named as a.txt for example. I am using a Linux machine, at present I only know that I can type R in the terminal and then copy-paste the content in a.txt to the R's interface

[R] SweaveListingUtils question

2009-07-13 Thread Karsten Weinert
Hello group, recently I read about the SweaveListingUtils package and now I would like to try it out. However I can not make it run... Below is a minimal example. The problem seems the following line, generated by the package:

[R] Smoothing parameter or Bandwidth (h)

2009-07-13 Thread forestra
Hello to everybody, I need to know the Smoothing Parameter to obtain Home Range of an animal through the Area Kernel. I have 200 locations with x and y. How can I obtain the Smoothing Parameter with R for LSCV, CV and Href method??? Thank you. -- View this message in context:

[R] problem predict/poly

2009-07-13 Thread Alexander V Stolpovsky
Dear R experts, I am observing undesired behavior of predict(fit, newdata), in case when fit object is produced by lm() involving a poly(). Here is how to reproduce: x - c(1:10) y - sin(c(1:10)) fit - lm(formula=y~poly(x, 5, raw=TRUE)) predict(fit, newdata=data.frame(x=c(1:10))) ## this works

Re: [R] how to run a R program with input arguments

2009-07-13 Thread edisonying
Thanks for your help. I found another cmd as follows: R CMD BATCH infile outfile what's the difference between this expression and your suggestion? cls59 wrote: edisonying wrote: I am a beginner in R and know only a little about it yet. I have a script written in R language,

  1   2   >