[R] bayesm - question about 'rscaleUsage function'

2007-08-07 Thread paulandpen
Hi all, I have managed to get the r-scale usage algorithm to work, but I need to obtain the final results from this. As I understand it, this code is designed to generate a matrix after processing and store it somewhere? Here is the code. I get this part of the code, it all makes

[R] how to convert decimal date to its equivalent date format(YYYY.mm.dd.hr.min.sec)

2007-08-07 Thread Yogesh Tiwari
Hello R Users, How to convert decimal date to date as .mm.dd.hr.min.sec For example, I have decimal date in one column , and want to convert and write it in equivalent date(.mm.dd.hr.min.sec) in another next six columns. 1979.00 1979.020833 1979.041667 1979.062500 Is it

Re: [R] About grep

2007-08-07 Thread Vladimir Eremeev
Shao wrote: Hi,everyone. I have a problem when using the grep. for example: a - c(aa,aba,abac) b- c(ab,aba) I want to match the whole word,so grep(^aba$,a) it returns 2 but when I used it a more useful way: grep(^b[2]$,a), it doesn't work at all, it can't find it, returning

Re: [R] About grep

2007-08-07 Thread Ted Harding
On 07-Aug-07 04:20:27, Shao wrote: Hi,everyone. I have a problem when using the grep. for example: a - c(aa,aba,abac) b- c(ab,aba) I want to match the whole word,so grep(^aba$,a) it returns 2 but when I used it a more useful way: grep(^b[2]$,a), it doesn't work at all, it can't

Re: [R] bayesm - question about 'rscaleUsage function'

2007-08-07 Thread Dieter Menne
paulandpen at optusnet.com.au writes: I get this part of the code, it all makes sense. ## if(nchar(Sys.getenv(LONG_TEST)) != 0) {R=1000} else {R=5} { data(customerSat) surveydat = list(k=10,x=as.matrix(customerSat)) Mcmc1 = list(R=R) set.seed(66)

[R] cannot add lines to plot

2007-08-07 Thread Zeno Adams
Hello, I want to plot a time series and add lines to the plot later on. However, this seems to work only as long as I plot the series against the default index. As soon as I plot against an object of class chron or POSIXt (i.e. I want to add a date/time axis), the lines do not appear anymore.

[R] help on glmmML

2007-08-07 Thread Fluss
Hello! I am using glmmML for a logitic regression with random effect. I use the posterior.mode as an estimate for the random effects. These can be very different from the estimates obtained using SAS , NLMIXED in the random with out= option. (all the fixed and standard error of random effect

Re: [R] cannot add lines to plot

2007-08-07 Thread Achim Zeileis
On Tue, 7 Aug 2007, Zeno Adams wrote: Hello, I want to plot a time series and add lines to the plot later on. However, this seems to work only as long as I plot the series against the default index. As soon as I plot against an object of class chron or POSIXt (i.e. I want to add a

Re: [R] Opening a script with the R editor via file association (on Windows)

2007-08-07 Thread S Ellison
Does ?Rscript help? Christopher Green [EMAIL PROTECTED] 06/08/2007 23:13:47 On Fri, 3 Aug 2007, Duncan Murdoch wrote: On 03/08/2007 7:16 PM, Christopher Green wrote: Is there an easy way to open an R script file in the R Editor found in more recent versions of R on Windows via a file

[R] Naming Lists

2007-08-07 Thread Tom.O
Hi Im pretty new to R and I have run in to a problem. How do I name all the levels in this list. Lev1 - c(A1,A2) Lev2 - c(B1,B2) Lev3 - c(C1,C2) MyList - lapply(TEST1,function(x){ assign(x,x,where=1) lapply(TEST2,function(y){ assign(y,y,where=1) lapply(TEST3,function(z){

Re: [R] cannot add lines to plot

2007-08-07 Thread Prof Brian Ripley
On Tue, 7 Aug 2007, Zeno Adams wrote: Hello, I want to plot a time series and add lines to the plot later on. However, this seems to work only as long as I plot the series against the default index. As soon as I plot against an object of class chron or POSIXt (i.e. I want to add a

[R] plotting series of matrices on a single plot.

2007-08-07 Thread Urmi Trivedi
Dear experts, I have in all 14 matrices which stands for gene expression divergence and 14 matrices which stands for gene sequence divergence. I have tried joining them by using the concatanation function giving SequenceDivergence - c(X1,X2,X3,X4,X5,X6,X7,X8,X9,X10,X11,X12,X13,X14)

Re: [R] Goodman-Kruskal tau

2007-08-07 Thread Antti Arppe
On Wed, 1 Aug 2007, Upasna Sharma [EMAIL PROTECTED] wrote: From: Upasna Sharma [EMAIL PROTECTED] Subject: [R] Goodman Kruskal's tau I need to know which package in R calculates the Goodman Kruskal's tau statistic for nominal data. Also is there any implementation for multiple classification

[R] R and excell differences in calculation F distributionfunction

2007-08-07 Thread Luis Ridao Cruz
R-help, I'm trying to work out the density function by doing: df(5.22245, 3, 22) [1] 0.005896862 df(15.20675, 6, 4) [1] 0.001223825 In excell the result is : 0.0071060464 * FDIST(5.22245,3,22) 0.011406 -- FDIST(15.20675,6,4) From my point of view the differences in the second

[R] warning in library(GRASS)

2007-08-07 Thread javier garcia-pintado
Hi, With your help I've found out that library(GRASS) is the responsible for several warnings I'm obtaining. I've got a loop (~100 runs) and for every loop, I'm carrying out several operations over a sequence of raster maps (12) read from the GRASS GIS. But for every map and loop I always use

[R] Classifly problems

2007-08-07 Thread Dani Valverde
Hello, I am trying to explore a classification with GGobi. I am trying to generate additional data according to the model so I can draw the decision boundaries on the GGobi plot. The problem is that I always get the same error: Error in predict.lda(model,data): wrong number of variables, even if I

Re: [R] R and excell differences in calculation F distributionfunction

2007-08-07 Thread Frede Aakmann Tøgersen
I think you'll have to compare FDIST to pf() and not df() Best regards Frede Aakmann Tøgersen Scientist UNIVERSITY OF AARHUS Faculty of Agricultural Sciences Dept. of Genetics and Biotechnology Blichers Allé 20, P.O. BOX 50 DK-8830 Tjele Phone: +45 8999 1900 Direct: +45 8999 1878

Re: [R] R and excell differences in calculation F distributionfu

2007-08-07 Thread Ted Harding
On 07-Aug-07 10:27:06, Luis Ridao Cruz wrote: R-help, I'm trying to work out the density function by doing: df(5.22245, 3, 22) [1] 0.005896862 df(15.20675, 6, 4) [1] 0.001223825 In excell the result is : 0.0071060464 * FDIST(5.22245,3,22) 0.011406 --

[R] Robust Standard Errors for lme object

2007-08-07 Thread Lucy Radford
Hi I have fitted a linear mixed model using the lme function but now wish to calculate robust standard errors for my model. I have been able to find several functions which calculate robust s.e for lm objects but have not been able to find a function which calcualtes robust s.e for lme objects.

[R] Functions for autoregressive Regressionmodels (Mix between times series and Regression Models) ?

2007-08-07 Thread Maja Schröter
Hello everybody, I've a question about autoregressive Regressionmodels. Let Y[1],.,Y[n], be a time series. Given the model: Y[t] = phi[1]*Y[t-1] + phi[2]*Y[t-1] + ... + phi[p]*Y[t-p] + x_t^T*beta + u_t, where x_t=(x[1t],x[2t],x[mt]) and beta=(beta[1],...,beta[m]) and u_t~(0,1) I

Re: [R] Classifly problems

2007-08-07 Thread hadley wickham
Have you tried using classifly directly? library(classifly) classifly(Tumor ~ ., my.data.set, lda) generate_classification_data is an internal function, and you are passing it the wrong arguments. Hadley On 8/7/07, Dani Valverde [EMAIL PROTECTED] wrote: Hello, I am trying to explore a

Re: [R] Functions for autoregressive Regressionmodels (Mix between times series and Regression Models) ?

2007-08-07 Thread Gabor Grothendieck
arima (see ?arima) supports explanatory variables in the xreg= argument. On 8/7/07, Maja Schröter [EMAIL PROTECTED] wrote: Hello everybody, I've a question about autoregressive Regressionmodels. Let Y[1],.,Y[n], be a time series. Given the model: Y[t] = phi[1]*Y[t-1] + phi[2]*Y[t-1]

[R] Number of days in each month

2007-08-07 Thread Lauri Nikkinen
Hi R-users, What is the best way to achieve a table which contains all days and months between years 2007-2020? I would like to calculate number of days in each month within those years (to data frame). Regards, Lauri [[alternative HTML version deleted]]

[R] problems saving jpg files

2007-08-07 Thread Monica Pisica
Hi, I have a batch routine that does PCA on a series of files and saves the results as a csv file, and the respective graphs as pdf and jpg. While pdf's are fine, jpg files have a light grey background does not matter what color i set the bg param. I am running this on a PC with 4 GB RAM -

Re: [R] Function for trim blanks from a string(s)?

2007-08-07 Thread S Ellison
Stripping either or both ends can be achieved by the somewhat tortuous but fairly general stripspace-function(x) sub(^\\s*([^ ]*.*[^ ])\\s*$, \\1,x) which uses a replacement buffer to keep the useful part of the string. Prof Brian Ripley [EMAIL PROTECTED] 06/08/2007 21:23:49 I am sure Marc

Re: [R] Number of days in each month

2007-08-07 Thread Dirk Eddelbuettel
On Tue, Aug 07, 2007 at 03:53:28PM +0300, Lauri Nikkinen wrote: What is the best way to achieve a table which contains all days and months between years 2007-2020? I would like to calculate number of days in each month within those years (to data frame). Here you go -- just replace

Re: [R] Number of days in each month

2007-08-07 Thread Gabor Grothendieck
diff(seq(as.Date(2007-01-01), as.Date(2021-01-01), by = month)) Time differences in days [1] 31 28 31 30 31 30 31 31 30 31 30 31 31 29 31 30 31 30 31 31 30 31 30 31 31 [26] 28 31 30 31 30 31 31 30 31 30 31 31 28 31 30 31 30 31 31 30 31 30 31 31 28 [51] 31 30 31 30 31 31 30 31 30 31 31 29 31

Re: [R] Number of days in each month

2007-08-07 Thread Gabor Grothendieck
Just one refinement if you want it nicely formatted: ts(diff(seq(as.Date(2007-01-01), as.Date(2021-01-01), by = month)), start = c(2007, 01), freq = 12) Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec 2007 31 28 31 30 31 30 31 31 30 31 30 31 2008 31 29 31 30 31 30 31

Re: [R] Number of days in each month

2007-08-07 Thread Chuck Cleland
Lauri Nikkinen wrote: Hi R-users, What is the best way to achieve a table which contains all days and months between years 2007-2020? I would like to calculate number of days in each month within those years (to data frame). Regards, Lauri How about this? X - seq(ISOdate(2007,1,1),

[R] Error in as.double.default(x) : (list) object cannot be coerced to 'double'

2007-08-07 Thread Urmi Trivedi
Dear experts, I have in all 14 matrices which stands for gene expression divergence and 14 matrices which stands for gene sequence divergence. I have tried joining them by using the concatanation function giving SequenceDivergence - c(X1,X2,X3,X4,X5,X6,X7,X8,X9,X10,X11,X12,X13,X14)

[R] logistic models validation for categorical data

2007-08-07 Thread Tom Willems
Dear fellow R-ussers, Thanks for your help on th AIC. I have yet an other question about logistic models. to buuild the model i used sevral packages, (MASS, nlme, binom), just to make sure i had all the tools at my disposal. now i would like to validat the model. ussing a cross validation tool.

Re: [R] Robust Standard Errors for lme object

2007-08-07 Thread Doran, Harold
Lucy: Why are you interested in robust standard errors from lme? Typically, robust standard errors are sought when there is model misspecification due to ignoring some covariance among units with a group. But, a mixed model is designed to directly account for covariances among units within a

Re: [R] Functions for autoregressive Regressionmodels (Mix between times series and Regression Models) ?

2007-08-07 Thread Achim Zeileis
On Tue, 7 Aug 2007, Gabor Grothendieck wrote: arima (see ?arima) supports explanatory variables in the xreg= argument. In addition to arima(), the function dynlm() in package dynlm might be useful if you want to fit the model by OLS. See also package dyn for a similar approach. Z On 8/7/07,

[R] Phi parameter in corAR(1) in NLMEs

2007-08-07 Thread Nelson, Kerrie P.
Hello, I have been fitting nonlinear models with random effects using nlme with the corCAR1 correlation structure, as I have unequally spaced observations per subject, and serially correlated errors. My question is regarding the Phi parameter. Example of output: Correlation Structure:

Re: [R] Catch errors

2007-08-07 Thread Gang Chen
Seth and Stephen, Thanks a lot for the explanation and help! I really appreciate it. Gang On Aug 6, 2007, at 6:41 PM, Stephen Tucker wrote: That's because tag - 1 is evaluated in a local environment (of the function) - once function(err) exits, the information is lost. Try R's -

[R] Contrast testing with lme

2007-08-07 Thread Gang Chen
I'm trying to run a contrast with lme, but could not get it work: anova(lme(Beta ~ Trust*Sex*Freq, random = ~1|Subj, Model), L=c (TrustT:Sex:Freq=1, TrustU:Sex:Freq=-1)) Error in anova.lme(lme(Beta ~ Trust * Sex * Freq, random = ~1 | Subj, : Effects TrustT:Sex:Freq, TrustU:Sex:Freq

[R] Interaction factor and numeric variable versus separate regressions

2007-08-07 Thread Sven Garbade
Dear list members, I have problems to interpret the coefficients from a lm model involving the interaction of a numeric and factor variable compared to separate lm models for each level of the factor variable. ## data: y1 - rnorm(20) + 6.8 y2 - rnorm(20) + (1:20*1.7 + 1) y3 - rnorm(20) +

Re: [R] Robust Standard Errors for lme object

2007-08-07 Thread Thomas Lumley
On Tue, 7 Aug 2007, Doran, Harold wrote: Lucy: Why are you interested in robust standard errors from lme? Typically, robust standard errors are sought when there is model misspecification due to ignoring some covariance among units with a group. But, a mixed model is designed to directly

[R] Positioning text in top left corner of plot

2007-08-07 Thread Daniel Brewer
Simple question how can you position text in the top left hand corner of a plot? I am plotting multiple plots using par(mfrow=c(2,3)) and all I want to do is label these plots a), b), c) etc. I have been fiddling around with both text and mtext but without much luck. text is fine but each plot

[R] saving output

2007-08-07 Thread Lynn Disney
I have a question about how to save the output of a logistic regression model in some format (delimited, preferably) so that I can manipulate it to make nice tables in excel. I have tried print, save, write, none seem to do what I want them to. Does anyone have any ideas? Lynn D. Disney,

Re: [R] Positioning text in top left corner of plot

2007-08-07 Thread Greg Snow
You can call par('usr') to find the current coordinates, then use the text function (the pos and offset arguments may be helpful as well) The cnvrt.coords function from the TeachingDemos package may also be of help for finding coordinates for the text function. Hope this helps, -- Gregory

Re: [R] Interaction factor and numeric variable versus separate regressions

2007-08-07 Thread Gabor Grothendieck
In the single model all three levels share the same intercept which means that the slope must change to accomodate it whereas in the three separate models they each have their own intercept. Try looking at it graphically and note how the black dotted lines are all forced to go through the same

Re: [R] saving output

2007-08-07 Thread Kyle.
It's not so straightforward with the manipulation, but if you're familiar with LaTeX, I'd recommend the xtable package. It makes very readable regression summaries. Kyle H. Ambert Department of Behavioral Neuroscience Oregon Health Science University On 8/7/07, Lynn Disney [EMAIL

[R] array

2007-08-07 Thread Tiandao Li
Hello, I have some files generated from microarray experiments. I used scan() to read the files, and assigned each file to a unique name with many rows and columns. Now I want to create a array (ArrayA) with unique names, and I can use ArrayA[1,2][[6]] to refer the data in each file. Is there any

Re: [R] saving output

2007-08-07 Thread Henrique Dallazuanna
See ?sink -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40 S 49° 16' 22 O On 07/08/07, Lynn Disney [EMAIL PROTECTED] wrote: I have a question about how to save the output of a logistic regression model in some format (delimited, preferably) so that I can manipulate it to make nice

Re: [R] Positioning text in top left corner of plot

2007-08-07 Thread Benilton Carvalho
maybe this is what you want? plot(rnorm(10)) legend(topleft, A), bty=n) ? b On Aug 7, 2007, at 11:08 AM, Daniel Brewer wrote: Simple question how can you position text in the top left hand corner of a plot? I am plotting multiple plots using par(mfrow=c(2,3)) and all I want to do is

Re: [R] Robust Standard Errors for lme object

2007-08-07 Thread Doran, Harold
-Original Message- From: Thomas Lumley [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 07, 2007 11:06 AM To: Doran, Harold Cc: Lucy Radford; r-help@stat.math.ethz.ch Subject: Re: [R] Robust Standard Errors for lme object On Tue, 7 Aug 2007, Doran, Harold wrote: Lucy: Why

Re: [R] Interaction factor and numeric variable versus separate

2007-08-07 Thread Ted Harding
On 07-Aug-07 15:34:13, Gabor Grothendieck wrote: In the single model all three levels share the same intercept which means that the slope must change to accomodate it whereas in the three separate models they each have their own intercept. I think this arose because of the formulation of the

Re: [R] Interaction factor and numeric variable versus separate

2007-08-07 Thread Gabor Grothendieck
Also check this post https://stat.ethz.ch/pipermail/r-help/2007-May/132866.html for a number of formulations. On 8/7/07, Ted Harding [EMAIL PROTECTED] wrote: On 07-Aug-07 15:34:13, Gabor Grothendieck wrote: In the single model all three levels share the same intercept which means that the

Re: [R] Interaction factor and numeric variable versus separate regressions

2007-08-07 Thread Prof Brian Ripley
These are not the same model. You want x*f, and then you will find the differences in intercepts and slopes from group 1 as the coefficients. Remember too that the combined model pools error variances and the separate model has separate error variance for each group. To understand model

Re: [R] Naming Lists

2007-08-07 Thread Charles C. Berry
On Tue, 7 Aug 2007, Tom.O wrote: Hi Im pretty new to R and I have run in to a problem. How do I name all the levels in this list. One way: MyList - mapply(function(x) mapply( function(y) mapply( function(z)

Re: [R] Spatial sampling problem

2007-08-07 Thread Julian Burgos
Hello SK, I suggest you try the RandomFields package. It has specific functions for simulating random fields with an array of different algorithms and distributions. The GaussRF function in particular normal generates random fields. Julian Julian M. Burgos Fisheries Acoustics Research Lab

[R] XL files

2007-08-07 Thread Acharjee, Animesh
Dear All, I am new to R. I need to read XLs files, parse the data and convert them into txt format for further calculation . If any one have code for that , please send me code or suggestions for the same.Waiting for reply. Thanking you Animesh [[alternative HTML

[R] installing RMySql-0.6.0

2007-08-07 Thread yuewu
Hi, I am trying to install RMySql-.0.6.0 to work with WinXP, MySQL 5 and R 2.51. there is no binary for windows on cran-r, so i grabbed RMySql-0.6.0.tar.gz and tried to compile it. I get the following error: * checking for file 'RMySQL/DESCRIPTION' ... OK * preparing 'RMySQL': * checking

Re: [R] installing RMySql-0.6.0

2007-08-07 Thread Gabor Grothendieck
Actually there is an RMYSQL windows binary in the CRAN Extras area but it crashes on my XP machine when I try to use it. I have had more luck with the Windows binary in the Bioconductor Extras area (which seems to work except for some warnings that you can ignore):

[R] lm( ) for log10-transformed data

2007-08-07 Thread Kim Milferstedt
Dear help-list, I would like to perform a linear regression on the log10 of the two vectors ov.mag.min and res.600nm. The slope and intercept of the regression I use to plot a wider range of ov.mag.min in a double log plot. For a linear regression on only tow points, wouldn't I expect the

[R] input data file

2007-08-07 Thread Tiandao Li
Hello, I am new to R. I used scan() to read data from tab-delimited files. I want to save all my data files (multiple scan()) in another file, and use it like infile statement in SAS or \input{tex.file} in latex. Thanks! __ R-help@stat.math.ethz.ch

[R] how to include bar values in a barplot?

2007-08-07 Thread Donatas G.
How do I include bar values in a barplot (or other R graphics, where this could be applicable)? To make sure I am clear I am attaching a barplot created with OpenOffice.org which has barplot values written on top of each barplot. -- Donatas Glodenis http://dg.lapas.info

Re: [R] how to include bar values in a barplot?

2007-08-07 Thread Frank E Harrell Jr
Donatas G. wrote: How do I include bar values in a barplot (or other R graphics, where this could be applicable)? To make sure I am clear I am attaching a barplot created with OpenOffice.org which has barplot values written on top of each barplot. This causes an optical illusion in

[R] lmer() : crossed-random-effects specification

2007-08-07 Thread Daniel Caro
Dear all, I want to estimate a crossed-random-effects model (i.e., measurements, students, schools) where students migrate between schools over time. I'm interested in the fixed effects of SES, age and their interaction on read (reading achievement) while accounting for the sample design. Based

[R] small sample techniques

2007-08-07 Thread Nair, Murlidharan T
If my sample size is small is there a particular switch option that I need to use with t.test so that it calculates the t ratio correctly? Here is a dummy example? á =0.05 Mean pain reduction for A =27; B =31 and SD are SDA=9 SDB=12 drgA.p-rnorm(5,27,9); drgB.p-rnorm(5,31,12)

Re: [R] lm( ) for log10-transformed data

2007-08-07 Thread Duncan Murdoch
On 8/7/2007 2:58 PM, Kim Milferstedt wrote: Dear help-list, I would like to perform a linear regression on the log10 of the two vectors ov.mag.min and res.600nm. The slope and intercept of the regression I use to plot a wider range of ov.mag.min in a double log plot. For a linear

Re: [R] array

2007-08-07 Thread Roland Rau
Hi, Tiandao Li wrote: Hello, I have some files generated from microarray experiments. I used scan() to read the files, and assigned each file to a unique name with many rows and columns. Now I want to create a array (ArrayA) with unique names, and I can use ArrayA[1,2][[6]] to refer the

[R] How do I generate a grid of data in [0,1]?

2007-08-07 Thread esh
Hello, my objective is to produce a data.frame that represents a grid of data points evenly spaced as closely together as possible on a graph with domain and range both being [0,1]. I tried to get a smaller example working first and I tried the following code: sink(file=Rsampledata) a-0

Re: [R] How do I generate a grid of data in [0,1]?

2007-08-07 Thread Greg Snow
Try: data - expand.grid( a= seq(0,1,.1), b= seq(0,1,.1) ) Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of esh

[R] backslash c

2007-08-07 Thread Mikkel Grum
How do I get output with \color{blue}, i.e. with only one backslash??? \color{blue} [1] color{blue} Warning messages: 1: '\c' is an unrecognized escape in a character string 2: unrecognized escape removed from \color{blue} \\color{blue} [1] \\color{blue} Any help greatly appreciated.

Re: [R] backslash c

2007-08-07 Thread Henrique Dallazuanna
Perhaps: cat(\\color{blue}\n) -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40 S 49° 16' 22 O On 07/08/07, Mikkel Grum [EMAIL PROTECTED] wrote: How do I get output with \color{blue}, i.e. with only one backslash??? \color{blue} [1] color{blue} Warning messages: 1: '\c' is an

Re: [R] backslash c

2007-08-07 Thread Charles C. Berry
Mikkel, As RSiteSearch(backslash) would have shown you, this is a FAQ. Your second attempt is correct. To understand why, see the R FAQ 7.37 Why does backslash behave strangely inside strings? Chuck On Tue, 7 Aug 2007, Mikkel Grum wrote: How do I get output with

Re: [R] how to include bar values in a barplot?

2007-08-07 Thread Donatas G.
On Tuesday 07 August 2007 22:09:52 Donatas G. wrote: How do I include bar values in a barplot (or other R graphics, where this could be applicable)? To make sure I am clear I am attaching a barplot created with OpenOffice.org which has barplot values written on top of each barplot. Here is

Re: [R] how to include bar values in a barplot?

2007-08-07 Thread Gabor Grothendieck
See: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/56852.html On 8/7/07, Donatas G. [EMAIL PROTECTED] wrote: On Tuesday 07 August 2007 22:09:52 Donatas G. wrote: How do I include bar values in a barplot (or other R graphics, where this could be applicable)? To make sure I am clear I

[R] array

2007-08-07 Thread Tiandao Li
Hello, I have 30 GenePix tab-delimited files generated from 10 microarray experiments, each has 3 replicates. I used scan() to read the files, and assigned each file to a unique name (such as A1, A2, A3 for experment A, and B1, B2, and B3 for experiment B) with 1000 rows and 56 columns. Now I

Re: [R] how to include bar values in a barplot?

2007-08-07 Thread Greg Snow
Generally adding the numbers to a graph accomplishes 2 things: 1) it acts as an admission that your graph is a failure 2) it converts the graph into a poorly laid out table (with a colorful and distracting background) In general it is better to find an appropriate graph that does convey the

Re: [R] how to include bar values in a barplot?

2007-08-07 Thread Donatas G.
On Tuesday 07 August 2007 22:09:52 Donatas G. wrote: How do I include bar values in a barplot (or other R graphics, where this could be applicable)? To make sure I am clear I am attaching a barplot created with OpenOffice.org which has barplot values written on top of each barplot. After

[R] lmer() - crossed random effects specification

2007-08-07 Thread Daniel Caro
Dear all, I want to estimate a crossed-random-effects model (i.e., measurements, students, schools) where students migrate between schools over time. I'm interested in the fixed effects of SES, age and their interaction on read (reading achievement) while accounting for the sample design. Based

Re: [R] lmer() : crossed-random-effects specification

2007-08-07 Thread Douglas Bates
On 8/7/07, Daniel Caro [EMAIL PROTECTED] wrote: Dear all, I want to estimate a crossed-random-effects model (i.e., measurements, students, schools) where students migrate between schools over time. I'm interested in the fixed effects of SES, age and their interaction on read (reading

Re: [R] Mixture of Normals with Large Data

2007-08-07 Thread Tim Victor
I wasn't aware of this literature, thanks for the references. On 8/5/07, RAVI VARADHAN [EMAIL PROTECTED] wrote: Another possibility is to use data squashing methods. Relevant papers are: (1) DuMouchel et al. (1999), (2) Madigan et al. (2002), and (3) Owen (1999). Ravi.

[R] S4 methods: unable to find an inherited method

2007-08-07 Thread H. Paul Benton
Hello all, I consider myself pretty new to the whole OO based programming so I'm sorry if I'm doing something stupid. xml-read.metlin(url) Error in function (classes, fdef, mtable) : unable to find an inherited method for function read.metlin, for signature url read.metlin

Re: [R] Mixture of Normals with Large Data

2007-08-07 Thread Bert Gunter
Why would anyone want to fit a mixture of normals with 110 million observations?? Any questions about the distribution that you would care to ask can be answered directly from the data. Of course, any test of normality (or anything else) would be rejected. More to the point, the data are

Re: [R] Mixture of Normals with Large Data

2007-08-07 Thread Tim Victor
Have you considered the situation of wanting to characterize probability densities of prevalence estimates based on a complex random sample of some large population. On 8/7/07, Bert Gunter [EMAIL PROTECTED] wrote: Why would anyone want to fit a mixture of normals with 110 million observations??

Re: [R] Mixture of Normals with Large Data

2007-08-07 Thread Bert Gunter
Have you considered the situation of wanting to characterize probability densities of prevalence estimates based on a complex random sample of some large population. No -- and I stand by my statement. The empirical distribution of the data themselves are the best characterization of the

[R] R2WinBUGS results not different with different runs

2007-08-07 Thread toby909
Hi All I dont know if anyone else has noticed the same thing, but with 2 subsequent runs of the same syntax, I am getting exactly the same results. I was expecting that results differ slighlty, say in the 4th or 5th decimal place. Is this a specialty with R2WinBUGS? Does it have something to do

[R] Conditional subsetting

2007-08-07 Thread Tim Sippel
Hello- Upon searching the email archives and reading documentation I haven't found what I'm looking for. I have a dataset with a time/date stamp on a series of geographic locations (lat/lon) associated with the movements of animals. On some days there are numerous locations and some days there

Re: [R] input data file

2007-08-07 Thread jim holtman
If you are going to read it back into R, then use 'save'; if it is input to another applicaiton, consider 'write.csv'. I assume that when you say save all my data files you really mean save all my R objects. On 8/7/07, Tiandao Li [EMAIL PROTECTED] wrote: Hello, I am new to R. I used scan() to

Re: [R] how to convert decimal date to its equivalent date format(YYYY.mm.dd.hr.min.sec)

2007-08-07 Thread jim holtman
Is this what you want? x - scan(textConnection(1979.00 + + 1979.020833 + + 1979.041667 + + 1979.062500), what=0) Read 4 items # get the year and then determine the number of seconds in the year so you can # use the decimal part of the year x.year - floor(x) # fraction of the year x.frac

Re: [R] Conditional subsetting

2007-08-07 Thread Ross Darnell
Assuming *A* animal can only be in one location at any one time, I don't understand how once you have selected the location nearest 12pm how you can select based on the type of location? Do you mean to select on location before timei.e. from the best location visited that day which was closest

Re: [R] small sample techniques

2007-08-07 Thread Moshe Olshansky
Hi Nair, If the two populations are normal the t-test gives you the exact result for whatever the sample size is (the sample size will affect the number of degrees of freedom). When the populations are not normal and the sample size is large it is still OK to use t-test (because of the Central

Re: [R] Conditional subsetting

2007-08-07 Thread Tim Sippel
Thanks Ross. Yes, upon your remark it seems that maybe I need to be selecting first for the best available location, and then by the time stamp nearest to 12pm. It seems like tapply(), or aggregate() or aggregate.ts() might be applicable, but I'm working through trying different functions and

Re: [R] Conditional subsetting

2007-08-07 Thread Tim Sippel
I have tried the following to extract my subset and no luck yet. Any ideas? subset.df-subset(df, subset=c(DeployID,Date.Time, LocationQuality==(ordered(c(Good, Poor, Unknown))), Latitude,Longitude), select= min(abs(Date.Time-12:00))) I'm not sure if my 'ordered' argument will

Re: [R] input data file

2007-08-07 Thread Tiandao Li
In the first part of myfile.R, I used scan() 100 times to read data from 100 different tab-delimited files. I want to save this part to another data file, so I won't accidently make mistakes, and I want to re-use/input it like infile statement in SAS or \input(file.tex} in latex. Don't want to

Re: [R] Conditional subsetting

2007-08-07 Thread Gabor Grothendieck
Read the data in and transform the Date, Time and Quality columns so that Date and Time are the respective chron classes (see RNews 4/1 Help Desk article) and Quality is a factor such that lower levels are better. Then sort the data frame by Date, Quality and time from noon. That would actually

Re: [R] input data file

2007-08-07 Thread jim holtman
I would hope that you don't have 100 'scan' statements; you should just have a loop that is using a set of file names in a vector to read the data. Are you reading the data into separate objects? If so, have you considered reading the 100 files into a 'list' so that you have a single object with

[R] Binary Search

2007-08-07 Thread Matthew Walker
Hi! R is an amazing piece of software and with so many libraries it can do almost anything... but I was very surprised that a standard binary search function seems not to exist. I can find other much more highly-complex search routines (optimize, uniroot, nlm) in the standard

Re: [R] input data file

2007-08-07 Thread Tiandao Li
I thought of loop at first. My data were generated from 32 microarray experiments, each had 3 replicates, 96 files in total. I named the files based on different conditions or time series, and I really won't want to name them after numbers. It will make me confused later when I need to

Re: [R] input data file

2007-08-07 Thread jim holtman
You don't have to name them after numbers. What I sent was just an example of a character vector with file names. If you have all the files in a directory, then you can set the loop to read in all the files (or selected one based on a pattern match). If you are copy/pasting the 'scan' command,

Re: [R] R2WinBUGS results not different with different runs

2007-08-07 Thread Gregor Gorjanc
toby909 at gmail.com writes: Is this a specialty with R2WinBUGS? Does it have something to do with the seed value? Isnt the seed value reset everytime I restart winbugs? I always have the same seed if I start WinBUGS multiple times. Gregor __

[R] Define t-distribution using data, and ghyp package

2007-08-07 Thread Scott.Wilkinson
Dear R users, I am fitting a t-distribution to some data, then selecting randomly from the distribution. I am using the brand new ghyp package, which seems designed to do this. Firstly is this approach appropriate or are their alternatives I should also consider? I have a small dataset and the

Re: [R] Naming Lists

2007-08-07 Thread Tom.O
Thanks, I have considered using array but I dont belive its possible. For my function isn't really paste(), its a custom function that takes the three different parameters. The result however is a matrix where the size depends on the inputs. I belive thats hard to fit into an array. But if you

Re: [R] Conditional subsetting

2007-08-07 Thread Gabor Grothendieck
Another way to do this is by using the SQLite select statements making use of the sqldf package. First let us assume that the alphabetic order of the Quality levels reflects their desirability as well. In the example data this is true but if its not true in the whole data set where there may be