Re: [R] Shared Library Error

2008-05-29 Thread what's in the name?
I also tried to compile things differently, f95 -fno-second-underscore -c -fPIC pattern_dist.f90 gcc -std=gnu99 -shared -L/usr -o pattern_dist.so pattern_dist.o now, I get the following error: Error in dyn.load(~/myfortran/pattern_dist.so) : unable to load shared library

[R] OT: batch processing XLS files to CSV

2008-05-29 Thread Chris Evans
Dear R gurus, particularly those of generous M$ tolerance and diverse gifts and knowledge! I have an interesting challenge that I will end up crunching in R involving service usage by patients. Maybe I can do all of it in R but I can't see how yet. My situation is that our IT Department

[R] results of fligner.test

2008-05-29 Thread Stefan Th. Gries
Hi all I have a question regarding the Fligner-Killeen test. I am using - a PC with Windows XP (Build 20600.xpsp080413-2111 (Service Pack 3); - the following R version: sessionInfo() R version 2.7.0 (2008-04-22) i386-pc-mingw32 I have a vector LENGTH and a factor RELATION that are distributed

[R] akima interpolation and triangulation question

2008-05-29 Thread steven wilson
Dear all; First of all, this is probably a more conceptual question than a R-related one, but still want to give it a try. When working with the interpolation function interp from the package akima and the triangulation function tri.mesh from package tripack I've got NA's for the interpolation

Re: [R] cbind results to original data frame

2008-05-29 Thread ONKELINX, Thierry
Have you tried to merge the two datasets? See ?merge for the details. HTH, Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest Cel biometrie, methodologie

[R] Kappa distribution

2008-05-29 Thread Serguei Kaniovski
Hallo all, I am looking for an R implementation of the four parameter kappa distribution (cdf, pdf, quantile, and ransom numbers), or at a minimum, the generalized logistic distribution. Any suggestions? Thank you very much, Serguei __

[R] Argument Passing Construct in R Script

2008-05-29 Thread Gundala Viswanath
Hi, How can I create a construct argument passing in R script. So that later I can call it like this: $ R --vanilla myscript.R ARGUMENT1 ARGUMENT2 -- Gundala Viswanath __ R-help@r-project.org mailing list

Re: [R] Argument Passing Construct in R Script

2008-05-29 Thread Dieter Menne
Gundala Viswanath gundalav at gmail.com writes: How can I create a construct argument passing in R script. So that later I can call it like this: $ R --vanilla myscript.R ARGUMENT1 ARGUMENT2 The example http://finzi.psych.upenn.edu/R/Rhelp02a/archive/121806.html is for Windows, but

Re: [R] akima interpolation and triangulation question

2008-05-29 Thread Prof Brian Ripley
You have repeated (u,v) values in your data frame. It is not possible to interpolate such data, and I get an error from 'interp' (not NAs). *** SDTRAN Error 2: The first three data points are collinear. There is no problem with interpolating from a regular grid, but be aware that the

[R] Creating/Concatenate Strings into another String

2008-05-29 Thread Gundala Viswanath
Is there a way to do it? For example I tried this: args-commandArgs() fname - args[6].-.args[9] # then I would like to create a file # using the above created name postscript(filename=fname) dev.off() But that concatenation doesn't seem to do it. -- Gundala Viswanath

[R] boxplot with text and symbols on x

2008-05-29 Thread Birgit Lemcke
Hello R-user community! I am running R 2.7.0 on a Power Book (Tiger). (I am still R and statistics beginner) I did the following : pdf(InLnegthMaxHomogeneity.pdf) boxplot(inflorescence_length_Max~Sex, main=Bartletts Homogeneity for inflorescence length,data=FemMal_Sex)

Re: [R] Creating/Concatenate Strings into another String

2008-05-29 Thread Hans-Joerg Bibiko
On 29 May 2008, at 10:39, Gundala Viswanath wrote: Is there a way to do it? For example I tried this: args-commandArgs() fname - args[6].-.args[9] This would work under Perl :) Look for details: ?paste Try this: fname - paste(args[6], ., args[9], sep=) --Hans

Re: [R] OT: batch processing XLS files to CSV

2008-05-29 Thread Pascal Pascal
Hello, I'm not a guru but we have to do reporting with data in Excel files. We use xlsReadWrite package. Below an exemple, with an Excel.R file which import MySheet sheet from a MyFile.xls workbook. First column are numeric, Second are integer. Third character and so on. library(xlsReadWrite)

Re: [R] OT: batch processing XLS files to CSV

2008-05-29 Thread Prof Brian Ripley
I think the issue here is that the Excel spreadsheets as described do not contain simple tables of the form that the various .xls readers described in 'R Data Import/Export' handle. Your example is not applicable (and if it were there are several alternatives in that manual). I would look

Re: [R] OT: batch processing XLS files to CSV

2008-05-29 Thread Gabor Grothendieck
1. read.xls in the gdata package has a pattern= argument that will skip everything before the first cell containing that pattern. It calls xls2csv from the same package which in turn uses perl so it works on all platforms and does not require a copy of Excel. 2. If that is not good enough you

[R] how to use substring match as condition?

2008-05-29 Thread Albert Vilella
Hi, How can I use a substring match as a condition in a subset command? Sth like this: subset(input, field1==blah1 field2==blah2) # but now with substring match in field2 subset(input, field1==blah1 field3 *substringmatch* blah3) I've tried with gsub, but it won't work: subset(input,

Re: [R] heatmap-changing column or row names

2008-05-29 Thread Moreno Ignazio Coco
Hi Kevin, thanks a lot for the advices. The first suggestion worked, overall, I have to find a way to scale the names/numbers on the interval considered. But it was the good way to look at the problem. The second suggestion didn't really work. It is not a problem of custom fitting, it is

Re: [R] how to use substring match as condition?

2008-05-29 Thread john seers (IFR)
Something like this may be close to what you want: subset(input, field1==blah1 !is.na(charmatch(blah3,input$field3))) --- -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Albert Vilella Sent: 29 May 2008 11:38 To: r-help@r-project.org Subject: [R]

[R] Troubles plotting lrm output in Design Library

2008-05-29 Thread Patrizio Frederic
Dear R-helpers, I'm having a problem in using plot.design in Design Library. Tho following example code produce the error: n - 1000# define sample size set.seed(17) # so can reproduce the results age- rnorm(n, 50, 10) blood.pressure - rnorm(n, 120, 15) cholesterol-

Re: [R] boxplot with text and symbols on x

2008-05-29 Thread Gabor Grothendieck
1. See ?locator 2. Try this: plot(1:2, pch = c(\u2640, \u2642)) On Thu, May 29, 2008 at 4:40 AM, Birgit Lemcke [EMAIL PROTECTED] wrote: Hello R-user community! I am running R 2.7.0 on a Power Book (Tiger). (I am still R and statistics beginner) I did the following :

[R] Ubuntu rJava

2008-05-29 Thread threshold
Hi I am using ubuntu 8.04 and faced some problems when installing rJava. What I did first was install.packages(rJava) but I could not proceed since: checking Java support in R... configure: error: absent R was configured without Java support. Please run R CMD javareconf as root to add Java

Re: [R] Kappa distribution

2008-05-29 Thread Richard . Cotton
I am looking for an R implementation of the four parameter kappa distribution (cdf, pdf, quantile, and ransom numbers), or at a minimum, the generalized logistic distribution. I searched for kappa distribution on Rseek (http://www.rseek.org) and the functions you want appear to be in the

Re: [R] In fact this is a Stats question, but...

2008-05-29 Thread Ben Bolker
eesteves at ualg.pt writes: Dear All, I'me having (much) trouble understanding why it happened and answering a referee's comment to part of a submitted manuscript. I've tried to google for help but... I'm really confident that although this is a R-Help list someone can help me! I

Re: [R] In fact this is a Stats question, but...

2008-05-29 Thread Peter Dalgaard
Ben Bolker wrote: eesteves at ualg.pt writes: Dear All, I'me having (much) trouble understanding why it happened and answering a referee's comment to part of a submitted manuscript. I've tried to google for help but... I'm really confident that although this is a R-Help list someone

Re: [R] image() for grid package?

2008-05-29 Thread Karl Ove Hufthammer
Wittner, Ben, Ph.D.: Is there a way to display an image (such as is done with the function image()) in a grid package viewport? Yes. Use levelplot() from the lattice package. -- Karl Ove Hufthammer __ R-help@r-project.org mailing list

Re: [R] Troubles plotting lrm output in Design Library

2008-05-29 Thread Patrizio Frederic
dear Harrell, thank you for quick reply and suggestions. I still have the problem: library(Design) x = rnorm(100) y = runif(100)(exp(x)/(1+exp(x))) y = 0*y+1*y d = datadist(x,y) options(datadist=d) fit = lrm(y~x) # works fine, but plot(fit) #produce the error message Error in

Re: [R] can I do this with R?

2008-05-29 Thread Lucke, Joseph F
Frank, I believe, is correct. Using the AIC/BIC for data-driven model selection does NOT solve the stepwise problem. This is because the distribution of the sample AIC is changed from its original distribution to an extreme-value distribution, e.g.., min (AIC1, AIC2, ..., AICn). Thus,

[R] Joining uneven datasets

2008-05-29 Thread Neil Gupta
Hello, I have quite a simple problem that I believe can be solved quite easily. I have a dataframe as such: Symbol Date Time Exchange TickType ReferenceNumber Price Size 1 3:YMZ7.EC 12/03/2007 08:30:00 ECB83916044 133879 2 3:YMZ7.EC 12/03/2007 08:30:00 EC

Re: [R] In fact this is a Stats question, but...

2008-05-29 Thread S Ellison
The low R2 says the model does not explain much of the variance. But the high significance arises from the very large number of degrees of freedom. This is not an 'incompatibility'; just what happens with large dispersion, small effects and a very large number of observations. But you clearly

[R] Calculating conditional mean of large series of experiments

2008-05-29 Thread Anthony28
I need to repeat an experiment 1000 times. Each experiment involves randomly selecting one ball each from two separate bags. Each bag contains 10 balls, numbered 1, 2, 3, ... , 10. So the probability of selecting any one pair of balls is equal to all others. For each experiment, what I need to

[R] help with RPART

2008-05-29 Thread Linus An
Hi all, I am using RPART for my genetic study under ANOVA method. I wanted to know if it is possible to see r-squared or the amount of the variance in the data explained by a model (or a tree in this case from the RPART package. I am guessing that there has to be one since I am using ANOVA to

Re: [R] on attach/load of a *package*; was creating library

2008-05-29 Thread Uwe Ligges
yoo wrote: Hi, I'm able to create a library with R CMD INSTALL cmd, etc... I'm just You probably mean you are able to *install* a *package*, I guess. wondering.. is it possible that when the user says library(boo), it runs some initialization code? Yes: See the manual

Re: [R] calling C function from R

2008-05-29 Thread Uwe Ligges
What you have sent is almost unreadable. Please do not send HTML messages (as the posting guide suggests)! Wen-Ching Lin wrote: Hi, I am reading the source code of rpart. I have problems understand the following code and would appreciate for any helps. In rpart.s, there is a line: rpfit

Re: [R] In fact this is a Stats question, but... The return.

2008-05-29 Thread Peter Dalgaard
[EMAIL PROTECTED] wrote: *Thanks* all those who took the time to help me (even if the question was not related to - the use of - R). Now I think I can soundly make my point w/ the referee (can I use your replies? If so I intend to properly cite its use?!?). In general, I think it is best not

Re: [R] Searchreplace string?

2008-05-29 Thread Uwe Ligges
Perhaps you want to read the files only once, and save those 85 or whatever versions you want. For SearchReplace you might want to take a look at ?gsub and friends. Uwe Ligges Romain wrote: Hi there, I would like to know if it is possible to modify a text file with a R function. In fact I

Re: [R] how to use substring match as condition?

2008-05-29 Thread Charles C. Berry
On Thu, 29 May 2008, Albert Vilella wrote: Hi, How can I use a substring match as a condition in a subset command? Perhaps subset(input, field1==blah1 regexpr(blah2,field3) != -1 ) ?? Study in example(gsub) the regexpr example and in ?gsub the 'Value'

Re: [R] creating library

2008-05-29 Thread Prof Brian Ripley
If you mean a package ... 'Writing R Extensions' says Ideally, the @R{} code files should only directly assign @R{} objects and definitely should not call functions with side effects such as @code{require} and @code{options}. Note that you are expecting the side-effect of 'print', which is

[R] On reading posts on this list

2008-05-29 Thread Axel Etzold
Dear all, I am fairly new to R and this list (this is my first post), so I am wondering whether there is a possibility to view posts on this list conveniently on a website besides reading my email. I have in mind something like this : http://www.ruby-forum.com/forum/4 for the Ruby

[R] Plot colors

2008-05-29 Thread uv
Hi. I am plotting graphs for values ranging between -1 and 10, for example: (1,2,1,1,6,7,-1,-1,5,-1) I am trying to plot the graphs so that the points with value of -1 will be in one specific color, and the rest of the points will be in one different specific color. I would be grateful for any

[R] rbinom not using probability of success right

2008-05-29 Thread Kyle Matoba
Message: 24 Date: Wed, 28 May 2008 05:53:26 -0700 (PDT) From: Philip Twumasi-Ankrah [EMAIL PROTECTED] Subject: [R] rbinom not using probability of success right To: r-help@r-project.org Message-ID: [EMAIL PROTECTED] Content-Type: text/plain I am trying to simulate a series of ones and zeros (1

Re: [R] On reading posts on this list

2008-05-29 Thread Charles C. Berry
On Thu, 29 May 2008, Axel Etzold wrote: Dear all, I am fairly new to R and this list (this is my first post), so I am wondering whether there is a possibility to view posts on this list conveniently on a website besides reading my email. See

Re: [R] On reading posts on this list

2008-05-29 Thread Uwe Ligges
Yes, starting from http://www.r-project.org/ you can go to the mailing lists, choose the appropriate one, go to the corresponding archives and read all of it sorted by the most common criteria. Best wishes, uwe Axel Etzold wrote: Dear all, I am fairly new to R and this list (this is my

Re: [R] On reading posts on this list

2008-05-29 Thread Jorge Ivan Velez
Hi Axel, Perhaps http://www.nabble.com/R-f13819.html can be useful. Thanks, Jorge On Thu, May 29, 2008 at 12:03 PM, Axel Etzold [EMAIL PROTECTED] wrote: Dear all, I am fairly new to R and this list (this is my first post), so I am wondering whether there is a possibility to view posts

Re: [R] Plotting a cubic line from a multiple regression

2008-05-29 Thread Richard . Cotton
I'm attempting to plot a cubic relationship between two variables controlling for the effects of a third variable. In this short example, I'm trying to use AGE to predict CORTEX while controlling for the effects of TIV (total intracranial volume): cortex =

Re: [R] On reading posts on this list

2008-05-29 Thread Richard . Cotton
I am fairly new to R and this list (this is my first post), so I am wondering whether there is a possibility to view posts on this list conveniently on a website besides reading my email. You can see them on Nabble, but there is a delay of a couple of hours.

Re: [R] On reading posts on this list

2008-05-29 Thread stephen sefick
Rnabble, search on the CRAN site, and some others On Thu, May 29, 2008 at 12:03 PM, Axel Etzold [EMAIL PROTECTED] wrote: Dear all, I am fairly new to R and this list (this is my first post), so I am wondering whether there is a possibility to view posts on this list conveniently on a

Re: [R] Suitable package for carrying out sigma and beta co nvergence in panel data

2008-05-29 Thread Roger Bivand
Amarjit Singh Sethi set_alt at yahoo.co.in writes: Dear all I wish to carry out sigma- and beta-convergence analysis in respect of panel data [wherein current value of one of the variables needs be regressed upon suitably transformed lagged values of another variable(s)]. I am quite new

[R] Manipulating DataSets

2008-05-29 Thread Neil Gupta
Hello R-Users, I am new to R and trying my best however I need help with this simple task. I have a dataset, YM1207. X.Symbol Date Time Exchange TickType ReferenceNumber Price Size 12491 3:YMZ7.EC 12/03/2007 08:32:50 ECB 8598577013379

[R] Thank you

2008-05-29 Thread Tubin
In the past few weeks I have had to give myself a crash course in R, in order to accomplish some necessary tasks for my job. During that time, I've found this forum to be helpful time and time again - usually I find the answer to my problem by searching the archives; once or twice I've posted

[R] test for multivariate normality?

2008-05-29 Thread HongSheng Liao
My stat textbook tells me that using Shapiro-Wilk test for each variable one by one is not equal to a test for multivariate normality as a whole. Does R have a function of testing for multivariate normality? Thanks. Hongsheng (Hank) Liao, Ph.D. Lab Manager Center for Quantitative Fisheries

Re: [R] R reference Books

2008-05-29 Thread Wim Bertels
Hi Neil, as i am not an advanced user, i find reference cards very handy (google: reference card R) hth a bit, Wim Message: 70 Date: Wed, 28 May 2008 15:25:36 -0500 From: Neil Gupta [EMAIL PROTECTED] Subject: [R] R reference Books To: R-help@r-project.org Message-ID: [EMAIL PROTECTED]

[R] appropriate covariance matrix for multiple nominal exogenous and multiple continuous endogenous variables in SEM

2008-05-29 Thread Gus Jespersen
Hi, I would like to use the sem package to perform a path analysis (no latent variables) with a mixture of 2 nominal exogenous, 1 continuous exogenous, and 4 continuous endogenous variables. I seek advice as to how to calculate the appropriate covariance matrix for use with the sem package.

Re: [R] Troubles plotting lrm output in Design Library

2008-05-29 Thread Frank E Harrell Jr
Patrizio Frederic wrote: dear Harrell, thank you for quick reply and suggestions. I still have the problem: library(Design) x = rnorm(100) y = runif(100)(exp(x)/(1+exp(x))) y = 0*y+1*y d = datadist(x,y) options(datadist=d) fit = lrm(y~x) # works fine, but plot(fit) #produce the error

Re: [R] test for multivariate normality?

2008-05-29 Thread ctu
Yes. You could install mvnormtest Package and perform the multivariate normality test. By using mshapiro.test I wish this is helpful! Chunhao Tu Quoting HongSheng Liao [EMAIL PROTECTED]: My stat textbook tells me that using Shapiro-Wilk test for each variable one by one is not equal to

Re: [R] akima interpolation and triangulation question

2008-05-29 Thread steven wilson
thanks. one more thing w/r this particular data set: tri.mesh doesn't work in R but triangulation (S+SpatialStats) does work interp.old (diff ncp) doesn't work in R but it does in Splus for the same ncp values??? so,R or SPlus? who's right? On Thu, May 29, 2008 at 4:34 AM, Prof Brian

[R] How do you exit a function in R?

2008-05-29 Thread Bill Cunliffe
For example, based on a certain condition, I may want to exit my code early: # Are there the same number of assets in prices and positions? if (nAssetPositions != nAssetPrices) { cat(Different number of assets! \n\n)

Re: [R] How do you exit a function in R?

2008-05-29 Thread Roland Rau
Hi Bill Cunliffe wrote: For example, based on a certain condition, I may want to exit my code early: # Are there the same number of assets in prices and positions? if (nAssetPositions != nAssetPrices) { cat(Different number of assets! \n\n)

Re: [R] How do you exit a function in R?

2008-05-29 Thread Charles C. Berry
See ?return HTH, Chuck On Thu, 29 May 2008, Bill Cunliffe wrote: For example, based on a certain condition, I may want to exit my code early: # Are there the same number of assets in prices and positions? if (nAssetPositions != nAssetPrices) {

Re: [R] Thank you

2008-05-29 Thread Esmail Bonakdarian
Tubin wrote: In the past few weeks I have had to give myself a crash course in R, in order to accomplish some necessary tasks for my job. During that time, I've found this forum to be helpful time and time again - usually I find the answer to my problem by searching the archives; once or twice

Re: [R] How do you exit a function in R?

2008-05-29 Thread Xiaohui Chen
stop('Different number of assets! \n\n') X Bill Cunliffe 写道: For example, based on a certain condition, I may want to exit my code early: # Are there the same number of assets in prices and positions? if (nAssetPositions != nAssetPrices) {

Re: [R] How do you exit a function in R?

2008-05-29 Thread Esmail Bonakdarian
Bill Cunliffe wrote: For example, based on a certain condition, I may want to exit my code early: # Are there the same number of assets in prices and positions? if (nAssetPositions != nAssetPrices) { cat(Different number of assets! \n\n)

Re: [R] How do you exit a function in R?

2008-05-29 Thread Douglas Bates
It looks like you want to stop the function execution on detecting an error condition, in which case the appropriate function to call is stop(), as in if (nAssetPositions != nAssetPrices) stop(Different number of assets!) An alternative, if you don't want to write the error messages for each

Re: [R] optimization setup

2008-05-29 Thread threshold
Hi, thanks for your replay the previous post of mine. Let me ask you one more question similar to the previous one, based on a naive example: f1-function(theta, theta1) {theta[1]+theta[2]+theta1[1]} f2-function(theta, x, theta1) {f1(theta, theta1)*exp(x)*theta1[2]} function to be optimized

Re: [R] How do you exit a function in R?

2008-05-29 Thread ctu
You might try to use on.exit or stop? # on.exit if (nAssetPositions != nAssetPrices) { on.exit(cat(Different number of assets! \n)) } # stop if (nAssetPositions != nAssetPrices) { stop(Different number of assets!) } You could find these in S programming

Re: [R] How do you exit a function in R?

2008-05-29 Thread Henrique Dallazuanna
Try using stop: if (nAssetPositions != nAssetPrices) { stop(Different number of assets! \n\n) On Thu, May 29, 2008 at 3:23 PM, Bill Cunliffe [EMAIL PROTECTED] wrote: For example, based on a certain condition, I may want to exit my code early: # Are

Re: [R] Plot colors

2008-05-29 Thread Henrique Dallazuanna
Try: x - c(1,2,1,1,6,7,-1,-1,5,-1) plot(x, col = ifelse(x == -1, red, black), pch = 16) On Thu, May 29, 2008 at 1:23 PM, uv [EMAIL PROTECTED] wrote: Hi. I am plotting graphs for values ranging between -1 and 10, for example: (1,2,1,1,6,7,-1,-1,5,-1) I am trying to plot the graphs so that

Re: [R] Thank you

2008-05-29 Thread ctu
I totally agree both of you. This is a super place to mature the R. I learn a lot from this R heaven! Chunhao Quoting Esmail Bonakdarian [EMAIL PROTECTED]: Tubin wrote: In the past few weeks I have had to give myself a crash course in R, in order to accomplish some necessary tasks for my

[R] Datasets in R

2008-05-29 Thread Carlos López
I´m trying to find datasets that will give me residuals, after applying the lm function, with no normality, non linearity, and heteroscedacity so I can try to exemplify those cases in the linear regression model. Can you give any advice on what datasets would be appropiate? I can´t use the ones

Re: [R] optimization setup

2008-05-29 Thread ctu
Hi, I think Ray has answered this question in the previous e-mail. Because optim can only use one single parameter thus you can not have the parameters: theta, theta1 and x at the same time. such as: f1-function(theta) {theta[1]+theta[2]} f2-function(theta) {f1(theta)*3} f3-function(theta)

Re: [R] Plotting a cubic line from a multiple regression

2008-05-29 Thread Stephan Kolassa
Hi Ashish, I am rather more concerned about whether what you outlined is legitimate (your question 1 below). If you are looking at children, higher AGE will be associated with higher TIV, so both variables would essentially measure the same thing (see Miller Chapman, Misunderstanding

Re: [R] Manipulating DataSets

2008-05-29 Thread Peter Dalgaard
Neil Gupta wrote: Hello R-Users, I am new to R and trying my best however I need help with this simple task. I have a dataset, YM1207. X.Symbol Date Time Exchange TickType ReferenceNumber Price Size 12491 3:YMZ7.EC 12/03/2007 08:32:50 ECB 85985770

Re: [R] appropriate covariance matrix for multiple nominal exogenous and multiple continuous endogenous variables in SEM

2008-05-29 Thread John Fox
Dear Gus, If the nominal variables are exogenous then you need not use polychoric and polyserial correlations. (Indeed, if they are polytomous and unordered, then it would be inappropriate to do so.) Simply use dummy exogenous variables, as you would in a dummy regression. You could use a

Re: [R] optimization setup

2008-05-29 Thread Ray Brownrigg
Did you copy-paste that error message? I get: optim(par=c(1,1), f3) Error in f1(theta, theta1) : object theta not found You seem to be confusing your formal and actual parameters. When you invoke f3 (within optim()), theta is not defined within f3(). Ray On Fri, 30 May 2008, threshold

[R] lm() function

2008-05-29 Thread hanen
hi, my linear model is y=c+a*x1+b*x2 i tried to found a, c, b by the use of: mymodel-lm(y~1+x1+x2) where y, x1, x2 are 3 vectors with the same length the result is a=NA.so i want to know where is the problem. -- View this message in context:

Re: [R] lm() function

2008-05-29 Thread Jorge Ivan Velez
Dear Hanen, You don't need 1 in your R code. Try this: # Model mymodel-lm(y~x1+x2) # Coefficients summary(mymodel) See also ?lm. Thanks, Jorge On Thu, May 29, 2008 at 5:15 PM, hanen [EMAIL PROTECTED] wrote: hi, my linear model is y=c+a*x1+b*x2 i tried to found a, c, b by the use

Re: [R] lm() function

2008-05-29 Thread Cleber Nogueira Borges
hanen wrote: hi, my linear model is y=c+a*x1+b*x2 i tried to found a, c, b by the use of: mymodel-lm(y~1+x1+x2) where y, x1, x2 are 3 vectors with the same length the result is a=NA.so i want to know where is the problem. It's the sum of x1 and x2 equal to one? run the command: round( sum(

Re: [R] lm() function

2008-05-29 Thread Rolf Turner
On 30/05/2008, at 9:57 AM, Jorge Ivan Velez wrote: Dear Hanen, You don't need 1 in your R code. Try this: # Model mymodel-lm(y~x1+x2) # Coefficients summary(mymodel) See also ?lm. That's not the problem. The ``1'' is redundant but does no harm. There is presumably something ``wrong''

Re: [R] Datasets in R

2008-05-29 Thread Roland Rau
Carlos López wrote: I´m trying to find datasets that will give me residuals, after applying the lm function, with no normality, non linearity, and heteroscedacity so I can try to exemplify those cases in the linear regression model. Can you give any advice on what datasets would be appropiate?

Re: [R] OT: batch processing XLS files to CSV

2008-05-29 Thread sjbarry
__ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] Unexpected behaviour in reading genomic coordinate files of R-2.7.0

2008-05-29 Thread Michael Lawrence
This is not really addressing your problem, but I thought you might want to know that the rtracklayer package in Bioconductor already supports parsing BED files, as well as GFF and WIG. It's main purpose is to load the tracks into genome browsers, like UCSC. Michael On Wed, May 28, 2008 at 1:11

Re: [R] Calculating conditional mean of large series of experiments

2008-05-29 Thread Moshe Olshansky
Your problem can be easily solved analytically yielding that E(A/B=b) = (110 - b*b)/(21 - 2*b) - no programming needed! If you insist on writing a program, you could do something like: x - sample(1:10,2000,replace=TRUE) M - matrix(x,nrow=2) #each column of M represents two balls A -

Re: [R] lm() function

2008-05-29 Thread Roland Rau
Hi, Cleber Nogueira Borges wrote: hanen wrote: hi, my linear model is y=c+a*x1+b*x2 i tried to found a, c, b by the use of: mymodel-lm(y~1+x1+x2) where y, x1, x2 are 3 vectors with the same length the result is a=NA.so i want to know where is the problem. It's the sum of x1 and x2 equal

Re: [R] help with simple function

2008-05-29 Thread T.D.Rudolph
I'm trying to build on Jim's approach to change the parameters in the function, with new rules: 1. if (x[i]==0) NA 2. if (x[i]0) log(x[i]/(number of consecutive zeros preceding it +1)) x-c(1,0,1,0,0,1,0,0,0,1,0,0,0,0,1) # i.e. output desired = c(0, NA, -0.69, NA, NA, -1.098, NA, NA, NA, -1.38,

Re: [R] lm() function

2008-05-29 Thread Cleber Nogueira Borges
my linear model is y=c+a*x1+b*x2 i tried to found a, c, b by the use of: mymodel-lm(y~1+x1+x2) where y, x1, x2 are 3 vectors with the same length the result is a=NA.so i want to know where is the problem. It's the sum of x1 and x2 equal to one? run the command: round( sum( c(x1,x2) ),12)==1

Re: [R] help with simple function

2008-05-29 Thread T.D.Rudolph
I'm trying to build on Jim's approach to change the parameters in the function, with new rules: 1. if (x[i]0) log(x[i]/(number of consecutive zeros immediately preceding it +1)) 2. if (x[i]==0) NA x-c(1,0,1,0,0,1,0,0,0,1,0,0,0,0,1) # i.e. output desired = c(0, NA, -0.69, NA, NA, -1.098, NA,

[R] Help for R on Windows for non-Win-enabled!

2008-05-29 Thread Ted Harding
Hi Folks, I need help with a query about R on Windows, specifically about graphics devices. I'm advising someone remotely (so it's all by email) who is running R on Windows, while I am not (Linux only). Things have reached the stage where saving graphics plots as Windows metafiles is looming.

Re: [R] Bimodal Distribution

2008-05-29 Thread Andrew Robinson
Hi Mike, if you can decompose the bimodal distribution into (eg two) known forms, then you could try a stepwise approach, eg: If uniform 0.5 then double it and use it to draw from the inverse cdf of A, else, double (uniform - 0.5) and use it to draw from the inverse cdf of B. You can change

[R] package for stochastic frontier models?

2008-05-29 Thread aaront
I need to estimate maximum tree crown radius and am looking for a package to prepare stochastic frontier models in R. I have not found any package references on Nabble R help, google, or R help. Any tips on a package for this? With regards, Aaron Trowbridge Researcher BV Research Centre

Re: [R] Help for R on Windows for non-Win-enabled!

2008-05-29 Thread Chuck Cleland
On 5/29/2008 7:48 PM, Ted Harding wrote: Hi Folks, I need help with a query about R on Windows, specifically about graphics devices. I'm advising someone remotely (so it's all by email) who is running R on Windows, while I am not (Linux only). Things have reached the stage where saving

[R] Problems with hclust and/or cutree.

2008-05-29 Thread Rolf Turner
I have been attempting to do some work using hclust, and have run into a (possibly subtle) problem. The background is that I constructed a dissimilarity matrix ``d1'' (it involved something called the ``Jaccard similarity coefficient''; I won't go into the details unless requested). I then

[R] existing package (mmlcr) modification -- appropriate process?

2008-05-29 Thread Jennifer Thacher
All: I am new to R and would like your help in identifying the appropriate process to follow in order to modify the output from an existing package. I've had difficulty finding an answer online, perhaps because I am using incorrect terminology. A package that I am using (mmlcr) invokes

Re: [R] existing package (mmlcr) modification -- appropriate process?

2008-05-29 Thread Xiaohui Chen
Hi Jenny, A simple solution is to add your line to the function, re-load/source the modified function to the console (e.g. by copy and paste). Then the new function with the same name as the original one will be called next time. If you don't want to use modified function any longer, just use

Re: [R] image() for grid package?

2008-05-29 Thread Felix Andrews
Yes, here are 3 functions that can do it grid::grid.rect RGraphics::grid.imageFun lattice::panel.levelplot On Thu, May 29, 2008 at 10:48 PM, Wittner, Ben, Ph.D. [EMAIL PROTECTED] wrote: Is there a way to display an image (such as is done with the function image()) in a grid package viewport?

Re: [R] Calculating conditional mean of large series of experiments

2008-05-29 Thread Anthony28
Yes I know the problem can be solved analytically -- the point was to see how well R could simulate the theory. In any case, your assistance is greatly appreciated and it worked well. Thankyou. R does a good job of simulating the experiment! -- View this message in context:

Re: [R] Problem with scatter plotting

2008-05-29 Thread Charilaos Skiadas
On May 29, 2008, at 9:56 PM, lek2k wrote: PLEASE do read the posting guide http://www.R-project.org/posting- guide.html and provide commented, minimal, self-contained, reproducible code. I (and certainly many others) have been using multiple points calls for a while now with no problems at

Re: [R] Including a tilde in a plotmath-type call

2008-05-29 Thread Charilaos Skiadas
On May 29, 2008, at 11:02 PM, [EMAIL PROTECTED] wrote: Suppose I have a plot plot(1:10, pch = ) And I want some text to indicate a Normal distrubition. I could do this: text(5, 6, substitute(XN(mu, sigma^2)), adj = 0) text(5.35, 6, ~, adj = 0) But that's clumsy, and depending on your

[R] imputationlist, update, and recode

2008-05-29 Thread Donald Braman
I'm stumbling my way through manipulating data in multiply imputed datasets, and have run into a problem translating code I used to run on my pre-imputed dataset to multiple datasets. The imputation runs just fine, as does the reading of the mi data sets into an imputationList. I run into

[R] Question about adding text to xYplot(Hmisc)

2008-05-29 Thread Wen Huang
Hello, I have been trying to make a graph that have error bars and text at specific position. I used the following code from the help file of xYplot(Hmisc) as an example except I add a myPanel function, which is just supposed to add letters from the alphabet at the position aligned at y

[R] nlm and missing argument

2008-05-29 Thread Redding, Matthew
Dear R Gurus, I am having a little difficulty with nlm. I've searched the archives and found nothing that tells me why this is occuring -- though there are some slightly similar issues. A simple example: lev2-function(aaa,bbb,ccc,ddd,eee){ res-aaa+bbb+ccc+ddd+eee res }

Re: [R] Tukey HSD (or other post hoc tests) following repeated measures ANOVA

2008-05-29 Thread Ullrich Ecker
Thanks, Dieter, but as far as I understand, 'glht' does not support objects of class 'aovlist' either. I mean, I know there is a TukeyHSD function out there, but that's the problem: repeated measures ANOVA yields an aovlist object, and TukeyHSD calls for an aov object. And I don't know if

  1   2   >