[R] How to write the log function in R

2008-09-02 Thread toh
Hi, I need help to write the following log-likelihood function in R: log(L) = sum [(y_k - y_k-1).log(m(t_k) - m(t_k-1)) - (m(t_k) - m(t_k-1)) - log((y_k -y_k-1)!)] I need to write this log-likelihood function in order to find the parameters by MLE method. Appreciate the help. -- View this

[R] installation problem: package 'mgcv' could not be loaded

2008-09-02 Thread Simon Zhu
Hello all, i'm a newbie of R trying to make some statistical work in R environment. Now i have to laptops, one is Thinkpad X40 with Debian Lenny and the other is Thinkpad T43 with Ubuntu 8.10. Recently i met such problem and am wondering if anybody can do some help. After upgrading my

Re: [R] correlation with boot

2008-09-02 Thread Prof Brian Ripley
On Tue, 2 Sep 2008, [EMAIL PROTECTED] wrote: Hi Professor Ripley, (Thank you very much)^infinite for your response. I still have few questions 1. R shows that I have two column in nlaw data. ncol(nlaw) [1] 2 corr(nlaw) [1] 0.7763745 Since we don't have law, we don't know what nlaw is: you

Re: [R] Upgrade 'R'

2008-09-02 Thread Keith Jewell
As possible help to others, and also as a request for comments on how I might do things better, I describe how I've recently altered my system to handle this. I'm on a Windows Server 2003 network and the R installation is accessible to many others. Everyone has read access to all installation

Re: [R] convenient way to calculate specificity, sensitivity and accuracy from raw data

2008-09-02 Thread drflxms
Hello Dimitris, Hello Gabor, absolutely incredible! I can't tell you how happy I am about your code which worked out of the box and saved me from days of boring and stupid Excel-handwork. Thank you a thousand times! Just for other newbies, that might be faced with a similar problem, I'd like to

Re: [R] Interpolation Problems

2008-09-02 Thread Steve Murray
Thanks Duncan - a couple of extra points... I should have perhaps pointed out that the data are on a *regular* 'box' grid (with each value currently spaced at 1 degree intervals). Also, I'm looking for something fairly simple, like a bilinear interpolation (where each new point is created

[R] How to create functions with new defaults?

2008-09-02 Thread Prabhanjan Tattar
Hi R! I attempt to clear my question through this example. We know that the default functions for t.test is t.test(x, y = NULL, alternative = c(two.sided, less, greater), mu = 0, paired = FALSE, var.equal = FALSE, conf.level = 0.95, ...) Suppose, I want to

Re: [R] How to create functions with new defaults?

2008-09-02 Thread David Hajage
I can't test it right now, but is this ok ? t.test.new - function(x, y = NULL, alternative = c(two.sided, less, greater), mu = 0, paired = TRUE, var.equal = FALSE, conf.level = 0.95, ...) { t.test(x, y, alternative, mu, paired, var.equal, conf.level,

[R] cluster a distance(analogue)-object using agnes(cluster)

2008-09-02 Thread Birgitle
I try to perform a clustering using an existing dissimilarity matrix that I calculated using distance (analogue) I tried two different things. One of them worked and one not and I don`t understand why. Here the code: not working example library(cluster) library(analogue)

Re: [R] Exporting frequency distributions

2008-09-02 Thread Jim Lemon
Luz Milena Zea Fernandez wrote: Dear support, we are trying to export a frequency distributions obtanined by stament freq(x,variable.labels=NULL,display.na=TRUE,levels=NULL) of prettyR. How can I do it? Hi Luz, If you want to export (save to a file) the output of freq: sink(myfile.out)

Re: [R] plotting glmmPQL function

2008-09-02 Thread Dieter Menne
rhelpless wrote: 'm an R newbie struggling a bit with the glmmPQL function (from the nlme pack). i think i've managed to run the model successfully, but can't seem to plot the resulting function. plot(glmmPQL(...)) plots the residuals rather than the model Use predict on the fit; you

Re: [R] Upgrade 'R'

2008-09-02 Thread Prof Brian Ripley
On Tue, 2 Sep 2008, Keith Jewell wrote: As possible help to others, and also as a request for comments on how I might do things better, I describe how I've recently altered my system to handle this. I'm on a Windows Server 2003 network and the R installation is accessible to many others.

Re: [R] How to create functions with new defaults?

2008-09-02 Thread Prof Brian Ripley
On Tue, 2 Sep 2008, David Hajage wrote: I can't test it right now, but is this ok ? t.test.new - function(x, y = NULL, alternative = c(two.sided, less, greater), mu = 0, paired = TRUE, var.equal = FALSE, conf.level = 0.95, ...) { t.test(x, y, alternative, mu,

[R] plotting glmmPQL function

2008-09-02 Thread rhelpless
hello all, i'm an R newbie struggling a bit with the glmmPQL function (from the nlme pack). i think i've managed to run the model successfully, but can't seem to plot the resulting function. plot(glmmPQL(...)) plots the residuals rather than the model... i know this should be basic, but i

[R] Newbie question - how to do it 'right'

2008-09-02 Thread JohnDoe365
I read the documentation carefully, yet I miss the experience to do it right Suppose I have a data.frame DS with this data: Homepage? Willhaveone?When? HP WHP WHEN levels='Yes', 'No' levels='Yes', 'No', 'NV'

Re: [R] intercept of 3D line? (Orthogonal regression)

2008-09-02 Thread William Simpson
OK thanks Moshe I will think about your answer. Cheers Bill On Tue, Sep 2, 2008 at 5:55 AM, Moshe Olshansky [EMAIL PROTECTED] wrote: I do not see why you can not use regression even in this case. To make things more simple suppose that the exact model is: y = a + b*x, i.e. y1 = a + b*x1

Re: [R] Upgrade 'R'

2008-09-02 Thread Keith Jewell
Prof Brian Ripley [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Tue, 2 Sep 2008, Keith Jewell wrote: As possible help to others, and also as a request for comments on how I might do things better, I describe how I've recently altered my system to handle this. I'm on a

Re: [R] Upgrade 'R'

2008-09-02 Thread Gabor Grothendieck
One possibility is to only keep one version when the third digit in the version number changes and only create new fresh versions when the first or second digit in the version number changes. Thus when going from 2.7.1 to 2.7.2 you could just overwrite the 2.7.1 installation with the new 2.7.2

Re: [R] Upgrade 'R'

2008-09-02 Thread Prof Brian Ripley
On Tue, 2 Sep 2008, Keith Jewell wrote: Prof Brian Ripley [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Tue, 2 Sep 2008, Keith Jewell wrote: As possible help to others, and also as a request for comments on how I might do things better, I describe how I've recently altered my

Re: [R] How remove the small outline around R plots in LaTeX?

2008-09-02 Thread Prof Brian Ripley
I think this is already fixed: please try the current version of R (see the posting guide). It is specific to the R.app GUI, so R-sig-mac would be the appropriate list. (I think this is somewhere in that list's archives.) An alternative is to use R's pdf() device, including using

Re: [R] Interpolation Problems

2008-09-02 Thread Roger Bivand
Steve Murray smurray444 at hotmail.com writes: Thanks Duncan - a couple of extra points... I should have perhaps pointed out that the data are on a *regular* 'box' grid (with each value currently spaced at 1 degree intervals). Also, I'm looking for something fairly simple, like a

Re: [R] programming

2008-09-02 Thread Michael Lawrence
Am I missing something or does that list not include Emacs/ESS? It's also missing TextMate (for the Mac people). There's probably a bunch more stuff for Eclipse than it mentions. Michael On Mon, Sep 1, 2008 at 6:17 PM, Gabor Grothendieck [EMAIL PROTECTED]wrote: Check out:

Re: [R] programming

2008-09-02 Thread stephen sefick
smultron is my favorite editor on mac. It is more or less a text editor with some text highlighting. I can see the use of Emacs, but my thinking isn't quite there yet. for what its worth Stephen On Tue, Sep 2, 2008 at 8:41 AM, Michael Lawrence [EMAIL PROTECTED] wrote: Am I missing something

[R] subsetting the gene list

2008-09-02 Thread Abhilash Venu
Hi all, I am working on a single color expression data using limma. I would like to perform a cluster analysis after selecting the differentially genes based on the P value (say 0.001). As far as my knowledge is concerned I have to do the sub setting of these selected genes on the normalized data

[R] Non-constant variance and non-Gaussian errors with gnls

2008-09-02 Thread Paul Suckling
I have been using the nls function to fit some simple non-linear regression models for properties of graphite bricks to historical datasets. I have then been using these fits to obtain mean predictions for the properties of the bricks a short time into the future. I have also been calculating

[R] Free SQL Database with R

2008-09-02 Thread Chibisi Chima-Okereke
Hi all, could someone tell me which is the best user-friendly free/open source sql database system to use with R, particularly as a back-end for a data-hungry web page? Thanks in advance. Kind Regards Chibisi [[alternative HTML version deleted]]

Re: [R] give all combinations

2008-09-02 Thread Adaikalavan Ramasamy
Yuan Jian, sending 9 emails within the span of few seconds all with similar text is very confusing to say the least! Carl, look up combinations() and permutations() in the gtools package. For two case scenario, you can use combinations() v - c(a,b,c) library(gtools) tmp -

Re: [R] Help with nonlinear regressional

2008-09-02 Thread Dieter Menne
LuriFax wrote: When I do a regressional curve fit without any constraints I get a huge deviation from the measured value and the fitted curve at the first data point in the curve (se the bottom picture). Note that this is a text-only list; most people cannot see your figure, I read it

[R] Error in .local(object, ...) : test vector does not match model !

2008-09-02 Thread Nair, Murlidharan T
I am getting a really strange error when I am using predict on an ksvm model. The error is Error in .local(object, ...) : test vector does not match model !. I do understand that this happens when the test vectors do not match the Model. But in this case it is not so. I am attaching a portion

Re: [R] give all combinations

2008-09-02 Thread Martin Maechler
CW == Carl Witthoft [EMAIL PROTECTED] on Mon, 01 Sep 2008 12:19:07 -0400 writes: CW I seem to be missing something here: CW given a set X:{a,b,c,whatever...} CW the mathematical definition of 'permutation' is the set of all possible CW sequences of the elements of X. CW

[R] receiving Error: cannot allocate vector of size 1.5 Gb

2008-09-02 Thread Hayes, Daniel
Dear all, In my attempt to run the below modelling command in R 2.7.0 under windows XP (4GB RAM with /3GB switch set) I receive the following error: Error: cannot allocate vector of size 1.5 Gb I have searched a bit and have tried adding: --max-mem-size=3071M to the command line (when

[R] two lattice graphs in one object

2008-09-02 Thread Andreas Krause
When I create a lattice/Trellis type graph, I typically write a function that returns the graph, as in do.graph - function(x, y, ...) { require(lattice) return(xyplot(y~x, ...)) } My question today is this: If I want two graphs on one page, one way of achieving it is to print the

[R] aov or lme effect size calculation

2008-09-02 Thread Greg Trafton
(A repost of this request with a bit more detail) Hi, All. I'd like to calculate effect sizes for aov or lme and seem to have a bit of a problem. partial-eta squared would be my first choice, but I'm open to suggestions. I have a completely within design with 2 conditions (condition and

[R] Help with nonlinear regressional

2008-09-02 Thread LuriFax
Dear All, I am doing experiments in live plant tissue using a laser confocal microscope. The method is called fluorescence recovery after photo-bleaching (FRAP) and here follows a short summary: 1. Record/ measure fluorescence intensity in a defined, round region of interest (ROI, in this case

[R] More help with stl?

2008-09-02 Thread rkevinburton
I don't understand the output of stl. As a simple example: y - numeric(1:365) y[250] = 1 stl - stl(ts(y, frequency=7), s.window=periodic) This returns without error but the results are puzzling to me. If you plot the results it is probably easiest to visualize what I mean. plot(stl) This

Re: [R] aov or lme effect size calculation

2008-09-02 Thread Doran, Harold
Greg You haven't really explained what your problem is. If it is conceptual (i.e., how do I do it) this is not really the right place for in-depth statistical advice, but it is often given. OTOH, if your problem is computational, please explain what that is? For example, maybe you know how to

[R] graphics: per mil plus delta notation

2008-09-02 Thread Nora Hanson
Hello All, I am looking for some help with was is probably very simple: I want the y-axis title '$BD(B13C$Bs(B VPDB' and similarly for nitrogen on a secondary axis. I am able to get the delta notation and per mil notation separately but one messes up the other with the inclusion of

Re: [R] Interpolation Problems

2008-09-02 Thread Pedro.Rodriguez
Hi Steve, It could be the case that you are trying to find values that are not in the range of values you are providing. For example, x - c(1,2,3,4,5) y - c(10,11,12,13,14) xout - c(0.01,0.02) approx(x,y,xout,method=linear) R's output: $x [1] 0.01 0.02 $y [1] NA NA If you want to see the

Re: [R] More help with stl?

2008-09-02 Thread stephen sefick
I can't reproduce this because the data has two points 0 and one at the ends of the data set, and I get an na.fail error. There is no periodic part to this data- it doesn't seem because there are only two points. stephen On Tue, Sep 2, 2008 at 11:38 AM, [EMAIL PROTECTED] wrote: I don't

[R] ftables package, zero rows

2008-09-02 Thread Marc Flockerzi
dear all, i'm just about to do some straightforward contingency tables using ftables (and ctab() for percents). the problem: factor a are regions, factor b are subregions. every region a consists of some subregions b, but obviously not every subregion b is part of every region a. if i use the

Re: [R] subsetting the gene list

2008-09-02 Thread Adaikalavan Ramasamy
Have you tried reading some of the material from the BioConductor workshop http://bioconductor.org/workshops/ ? Here is a simplistic way of proceeding: ## Calculate pvalues from t-test p - apply( mat, function(x) t.test( x ~ cl )$p.value ) ## Subset mat.sub - mat[ p, ] ## Cluster

Re: [R] More help with stl?

2008-09-02 Thread rkevinburton
There was a typo. I wnated to form an array so it should be: y - numeric(365) Now you should be able to reproduce it. Kevin stephen sefick [EMAIL PROTECTED] wrote: I can't reproduce this because the data has two points 0 and one at the ends of the data set, and I get an na.fail error.

[R] how to increase row number

2008-09-02 Thread ram basnet
Hi   I think this may be simple task but creating trouble to me. In my calculation, i have got large number of rows (5546) and column 182 but i am not able to see all the rows. May be somebody have idea how i can see all the rows ? I will be greatful if any body help me. Thanks in advance  

Re: [R] How is the binding for a super assignment made visible?

2008-09-02 Thread Gabor Grothendieck
You could try using an assign statement instead: assign(Globals, list(), .GlobalEnv) and see if it complains about that or not. On Mon, Sep 1, 2008 at 10:01 PM, [EMAIL PROTECTED] wrote: The statement Globals - list() in the body of a function in a package was intended to write an empty list

Re: [R] ftables package, zero rows

2008-09-02 Thread Henrique Dallazuanna
Try this: test[test == 0] - '' test On Tue, Sep 2, 2008 at 1:03 PM, Marc Flockerzi [EMAIL PROTECTED]wrote: dear all, i'm just about to do some straightforward contingency tables using ftables (and ctab() for percents). the problem: factor a are regions, factor b are subregions. every

Re: [R] receiving Error: cannot allocate vector of size 1.5 Gb

2008-09-02 Thread Rory.WINSTON
See http://cran.r-project.org/bin/windows/base/rw-FAQ.html#There-seems-to-be-a-limit-on-the-memory-it-uses_0021 Rory Winston RBS Global Banking Markets Office: +44 20 7085 4476 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hayes, Daniel Sent: 02

Re: [R] How is the binding for a super assignment made visible?

2008-09-02 Thread Thomas Lumley
On Tue, 2 Sep 2008 [EMAIL PROTECTED] wrote: The statement Globals - list() in the body of a function in a package was intended to write an empty list to the R workspace to collect results during the computations of the function. A package name space has not beenspecified. The package

Re: [R] graphics: per mil plus delta notation

2008-09-02 Thread Henrique Dallazuanna
Try this: plot(1, ylab=expression({delta}^13*C~'\211'~VPDB)) 2008/9/2 Nora Hanson [EMAIL PROTECTED] Hello All, I am looking for some help with was is probably very simple: I want the y-axis title '¦Ä13C¡ë VPDB' and similarly for nitrogen on a secondary axis. I am able to get the delta

[R] 3D Graphs

2008-09-02 Thread Raphael Fraser
Can R plot 3D graphs? If so, how would you plot x^2 + y^2 + z^2 = 1? Thanks Raphael __ 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

Re: [R] More help with stl?

2008-09-02 Thread stephen sefick
.15+.52 #seasonal (.01*52) I think because you said it was periodic [1] 0.67 .8+.67 #seasonal + trend + positive remainder [1] 1.47 now if you look at the little bit that is in the remainder being negative then you can probably subtract about .4ish which is close to 1 which is the value of the

Re: [R] how to increase row number

2008-09-02 Thread Chuck Cleland
On 9/2/2008 12:30 PM, ram basnet wrote: Hi I think this may be simple task but creating trouble to me. In my calculation, i have got large number of rows (5546) and column 182 but i am not able to see all the rows. May be somebody have idea how i can see all the rows ? I will be

Re: [R] 3D Graphs

2008-09-02 Thread Duncan Murdoch
On 9/2/2008 12:42 PM, Raphael Fraser wrote: Can R plot 3D graphs? If so, how would you plot x^2 + y^2 + z^2 = 1? There are several ways. Plotting a function z = f(x,y) is easiest; persp or image or contour can do that. Plotting a general surface is harder, but there are examples of how to

Re: [R] receiving Error: cannot allocate vector of size 1.5 Gb

2008-09-02 Thread Prof Brian Ripley
Please study the rw-FAQ. With a 2GB address space your chance of getting a 1.5GB contiguous block is essentially zero. On Tue, 2 Sep 2008, Hayes, Daniel wrote: Dear all, In my attempt to run the below modelling command in R 2.7.0 under windows XP (4GB RAM with /3GB switch set) I receive

Re: [R] Text

2008-09-02 Thread Greg Snow
In recent versions of R there are the functions grconvertX and grconvertY that will convert between the different coordiate systems. You can use them to convert from the device or ndc systems to user coordinates, then place the text using the text function. Hope this helps, -- Gregory (Greg)

Re: [R] multinomial estimation output stat question - not R question

2008-09-02 Thread Greg Snow
Mark, There are a couple of possible things that could be going on here: In regular ANOVA cases you can have a situation where you have 3 groups, A, B, and C where A and C are significantly different from each other, but B lies between them in such a way that we cannot say that B is

Re: [R] Text

2008-09-02 Thread Nair, Murlidharan T
Dani, You can put text on your graphs using the locator function. Here is an example hist(rnorm(1000,0,1) #plots a histogram for you xy.cord-locator(1) #Once you give this click on the graph to get the coordinates text(xy.cord, Text you want to write) Hope this helps. Cheers../Murli

Re: [R] Help with stl

2008-09-02 Thread stephen sefick
#from the ?stl examples g-stl(nottem, per) g #in g are the residuals, sesonal trend, and the remainder. It looks like you are going to have to #model this decompostion to get at what you want. Stephen On Tue, Sep 2, 2008 at 12:50 AM, Ryan [EMAIL PROTECTED] wrote: rkevinburton at charter.net

Re: [R] aov or lme effect size calculation

2008-09-02 Thread Doran, Harold
Greg Upgrade your packages to the supported versions (lme4 and Matrix), and use lmer and not lme. ### Example example(lmer) anova(fm1) Analysis of Variance Table Df Sum Sq Mean Sq F value Days 1 30032 30032 45.854 Your method for eta-squared with a mixed model is another story,

[R] What questions can be asked given this information?

2008-09-02 Thread JohnDoe365
This is a general statistic question, but maybe ... Suppose there are 1000 persons. In 2002, 400 out of those 1000 persons participated in a questionaire and 330 said they own a homepage. In 2008, 530 out of those 1000 persons participated in a questionaire and 490 said they own a homepage.

Re: [R] aov or lme effect size calculation

2008-09-02 Thread Greg Trafton
Sorry about that. My problem is computational, not statistical and exactly as you say: I don't quite know how to get the correct variance component from either aov or lme. the way to compute partial eta squared is: partial-eta-squared = SS(effect) / (SS(effect) + SS(error)) AOV gives

Re: [R] More help with stl?

2008-09-02 Thread Ryan Hafen
Trying your example: y - numeric(365) y y[250] = 1 y y.stl - stl(ts(y, frequency=7), s.window=periodic) First of all, pay attention to the axes on your plot - the scales are different for each panel. Your seasonal component is quite small in magnitude compared to everything else. Also, if

Re: [R] how to increase row number

2008-09-02 Thread ram basnet
Dear Chuck Cleland,   Thank you very much. I got the answer what i searching for. Thanks again.   sincerely, Ram Kumar Basnet --- On Tue, 9/2/08, Chuck Cleland [EMAIL PROTECTED] wrote: From: Chuck Cleland [EMAIL PROTECTED] Subject: Re: [R] how to increase row number To: [EMAIL PROTECTED] Cc:

Re: [R] More help with stl?

2008-09-02 Thread rkevinburton
The data is real. The fact that there are a bunch of zeros and only one value of 1 is just the way things are. I have over 20,000 data sets and some are like this. Admittedly this is not periodic but ideally you should see all frequencies at various amplitudes, remniscent of the impulse

[R] question about GLM

2008-09-02 Thread Aiste Aistike
Hello R-users, I do not have much knowledge about generalized linear models therefore my question maybe quite stupid. I have data from 20 towns with their population and number of people with an illness from those towns. I would like to use glm function in R so I can calculate proportions of ill

Re: [R] More help with stl?

2008-09-02 Thread stephen sefick
what kind of data is this? On Tue, Sep 2, 2008 at 3:10 PM, [EMAIL PROTECTED] wrote: The data is real. The fact that there are a bunch of zeros and only one value of 1 is just the way things are. I have over 20,000 data sets and some are like this. Admittedly this is not periodic but ideally

Re: [R] More help with stl?

2008-09-02 Thread rkevinburton
Thank you. I am not saying the data is wrong. I can do somethiing like: y = tread + seasonal + remainder and it gives me back the original data almost exactly. I just don't know how to interpret it. The data is clearly not periodic but I was expecting to get more information about the function

Re: [R] two lattice graphs in one object

2008-09-02 Thread Deepayan Sarkar
On Tue, Sep 2, 2008 at 6:24 AM, Andreas Krause [EMAIL PROTECTED] wrote: When I create a lattice/Trellis type graph, I typically write a function that returns the graph, as in do.graph - function(x, y, ...) { require(lattice) return(xyplot(y~x, ...)) } My question today is this:

[R] annotating individual panels produced by xyplot

2008-09-02 Thread Martin Brown
Hi all, I'm new to R and lattice and panel functions. I've produced a lattice graph using xyplot. Now I would like to add various, and *different*, annotations to each individual panel. I tried something like this, using panel.text ... code xyplot(dent ~ era | vegzone,

Re: [R] annotating individual panels produced by xyplot

2008-09-02 Thread Deepayan Sarkar
On Tue, Sep 2, 2008 at 1:23 PM, Martin Brown [EMAIL PROTECTED] wrote: Hi all, I'm new to R and lattice and panel functions. I've produced a lattice graph using xyplot. Now I would like to add various, and *different*, annotations to each individual panel. I tried something like this,

Re: [R] Help with nonlinear regressional

2008-09-02 Thread Daniel Malter
With that you should probably get advice from your local stats department. Although you describe your procedure, we do not know your data. And in particular, we do not know what you do in R. Just from inspecting your graph, it looks that your estimated function undershoots/overshoots the fitted

Re: [R] annotating individual panels produced by xyplot

2008-09-02 Thread Martin Brown
That helped -- got it working. Thanks! -mjb On Tue, Sep 2, 2008 at 1:28 PM, Deepayan Sarkar [EMAIL PROTECTED] wrote: See ?packet.number -Deepayan __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

[R] boxplot - label outliers

2008-09-02 Thread Sherri Heck
Hi All- I have 24 boxplots on one graph. I do not have the whiskers extending to the outliers, but I would like to label the maximum value of each outlier above the whiskers. I have the stats but am having trouble figuring out how to label the whiskers. Any suggestions would be great!

Re: [R] boxplot - label outliers

2008-09-02 Thread Greg Snow
Are you trying to find the values of the outliers? Or just how to add the text to the plot in the appropriate place? Or both? -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 -Original Message- From: [EMAIL PROTECTED]

[R] nls.control()

2008-09-02 Thread Ranney, Steven
All - I have data: TL age 388 4 418 4 438 4 428 5 539 10 432 4 444 7 421 4 438 4 419 4 463 6 423 4 ... [truncated] and I'm trying to fit a simple Von Bertalanffy growth curve with program: #Creates a Von Bertalanffy growth model

Re: [R] How to write the log function in R

2008-09-02 Thread Ben Bolker
toh tohbin at yahoo.com writes: Hi, I need help to write the following log-likelihood function in R: log(L) = sum [(y_k - y_k-1).log(m(t_k) - m(t_k-1)) - (m(t_k) - m(t_k-1)) - log((y_k -y_k-1)!)] I need to write this log-likelihood function in order to find the parameters by MLE

Re: [R] question about GLM

2008-09-02 Thread Ben Bolker
Aiste Aistike aiste.aistike at gmail.com writes: Hello R-users, I do not have much knowledge about generalized linear models therefore my question maybe quite stupid. I have data from 20 towns with their population and number of people with an illness from those towns. I would like to

[R] converting values of a dataframe to numeric (where possible)

2008-09-02 Thread Ralikwen
Hi, I am new to R. I have a dataframe with many columns some of which contain genuine strings some numerical values as strings. The dataframe is created by cast so I have no control over the resulting data type. I want to attach columns as aggregates of other columns to the dataframe. Here is the

Re: [R] boxplot - label outliers

2008-09-02 Thread Sherri Heck
Hi Greg, I have the values of the outliers from the boxplot stats. I am just having a difficult time adding the values to the plot in the appropriate places. Hope this is clearer. Thanks! sherri Greg Snow wrote: Are you trying to find the values of the outliers? Or just how to add the

[R] R Newbie: quantmod and zoo: Warning in rbind.zoo(...) : column names differ

2008-09-02 Thread Aval Sarri
Hello; I am trying following but getting a warning message : Warning in rbind.zoo(...) : column names differ, no matter whatever I do. Also I do not want to specify column names manually, since I am just writing a wrapper function around getSymbols to get chunks of data from various sources -

Re: [R] boxplot - label outliers

2008-09-02 Thread Greg Snow
OK, there are a couple of approaches that you can take. A simple approach is to use the 'locator' function to find the coordinates where you want to put the numbers by clicking on the plot, then use that result with the 'text' function. This is fine for a single plot with just a few outlier

Re: [R] R Newbie: quantmod and zoo: Warning in rbind.zoo(...) : column names differ

2008-09-02 Thread Achim Zeileis
On Wed, 3 Sep 2008, Aval Sarri wrote: Hello; I am trying following but getting a warning message : Warning in rbind.zoo(...) : column names differ, no matter whatever I do. Also I do not want to specify column names manually, since I am just writing a wrapper function around getSymbols to

[R] lattice command equivalent to points

2008-09-02 Thread Surai
Hello, This is my first post to R-help so forgive me if I'm committing a fatal error somehow.  Feel free to let me know.   My question is this:  I would like to add a triangle to represent the mean in a box plot generated with the bwplot command.   How do I do this?  I am able to do this using

[R] how to reduce stress value in isoMDS?

2008-09-02 Thread 陈武
I apply isoMDS to my data, but the result turns out to be bad as the stress value stays around 31! Yeah, 31 ,not 3.1... I don't know if I ignore something before recall isoMDS. My code as follow: m - read.table(e:/tsdata.txt,header=T,sep=,) article_number - ts(m, start = 2004,end=2008, frequency

Re: [R] how to reduce stress value in isoMDS?

2008-09-02 Thread 陈武
Sorry, wrong code. The right one here: library(MASS) cl-read.table(e:/data.txt,header=T,sep=,) row.names(cl)-colnames(cl) cm-as.matrix(cl) loc-sammon(cm) jpeg(filename=e:/plot.gif,width = 480, height = 480, units = px, pointsize = 12, quality = 75, bg = white, res = NA, restoreConsole = TRUE)

Re: [R] converting values of a dataframe to numeric (where possible)

2008-09-02 Thread jim holtman
Try this as a solution: df - data.frame(a=letters[15:17], b=c(21,NA,23), c=10:12, d=15:17) # convert to numeric x - as.matrix(df) mode(x) - numeric Warning message: In eval(expr, envir, enclos) : NAs introduced by coercion cbind(df, RTot=rowSums(x, na.rm=TRUE)) a b c d RTot 1 o 21 10 15

Re: [R] Error with Rcmdr package

2008-09-02 Thread John Fox
Dear Nguyen D Nguyen, The tcltk package is part of the standard R distribution. I'm not sure why you got this error, and you don't provide any details about your friend's system (OS, version of R, version of the Rcmdr package). To see why the problem lies, you might try loading just the tcltk

Re: [R] Polychoric and tetrachoric correlation

2008-09-02 Thread John Fox
Dear Andy, Yes, the tetrachoric correlation is a special case of the polychoric correlation when both factors are dichotomous. The 95-percent confidence interval that you suggest might be adequate if the sample size is sufficiently large and the correlation isn't too close to 0 or 1, but it is

Re: [R] Free SQL Database with R

2008-09-02 Thread hadley wickham
sqlite But for a sensible answer, you need to define what you mean by best. Hadley On Tue, Sep 2, 2008 at 8:16 AM, Chibisi Chima-Okereke [EMAIL PROTECTED] wrote: Hi all, could someone tell me which is the best user-friendly free/open source sql database system to use with R, particularly as

Re: [R] lattice command equivalent to points

2008-09-02 Thread Steven McKinney
This is close, but maybe not optimal lattice coding. I haven't yet figured out how to suppress the x axis labeling. bwplot(yield ~ 1|year, panel = function(x, y, ...){panel.bwplot(x, y, ..., pch = |); panel.points(x, mean(y), ..., pch=17)}, data = barley, horizontal = FALSE, xlab = ) Steve

[R] basic dataframe question

2008-09-02 Thread Matthew.Findley
R Users: I'm wondering: Why does my logical vector becomes a numeric vector when stuffed into a data frame? How do I change this so that it's retained as a logical data type? I've tried a couple of things but to no avail. Here's my example code: # Exercise 4-1 in Non-Detects and Data

Re: [R] lattice command equivalent to points

2008-09-02 Thread Deepayan Sarkar
On 9/2/08, Steven McKinney [EMAIL PROTECTED] wrote: This is close, but maybe not optimal lattice coding. I haven't yet figured out how to suppress the x axis labeling. bwplot(yield ~ 1|year, panel = function(x, y, ...){panel.bwplot(x, y, ..., pch = |); panel.points(x, mean(y), ...,