[R] clim.pact (fwd)
I'm trying to use the clim.pact package but I cannot find the descritions of map object or field object. For example, according to the man page of function map: Description Produces maps. Usage map(x,y=NULL,col=black,lwd=1,lty=1,sym=TRUE, plot=TRUE,inv.col=FALSE) Arguments x A map object. ... and according to the man page of plotField: Usage plotField(x,lon=NULL,lat=NULL,tim=NULL,mon=NULL, col=black,lty=1,lwd=1,what=ano) Arguments x A field object. retrieve.nc might be a clue, but the files mentioned in the man page are not included in the package: Description Reads a netCDF file and picks out vectors that look like lngitude, latitude and time. Returns the first 3-D field in the file. Usage retrieve.nc(f.name=data/ncep_t2m.nc,.. .../... Examples X.1 - retrieve.nc(data/mpi-gsdio_t2m.nc, x.rng=c(-60,40),y.rng=c(50,75)) X.2 - retrieve.nc(data/mpi-gsdio_slp.nc, x.rng=c(-60,40),y.rng=c(50,75)) I've downloaded a sample nc file from http://www.epic.noaa.gov/java/ncBrowse/ but don't get to use plotField. Does anyone have any experience using this package? Thanks Agus Dr. Agustin Lobo Instituto de Ciencias de la Tierra (CSIC) Lluis Sole Sabaris s/n 08028 Barcelona SPAIN tel 34 93409 5410 fax 34 93411 0012 [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] please help on frag polynoms
hi there, can anyone help me on the topic of frag polynoms? i just heard of a friend of mine, that i could build in a functioon called fragpoly (he was talking of such a function in the 'stata' language) in order to improve my process of finding an optimal linear model. instead of trying a vast amount of transformed inputdata to find the best fit and then step backwards down to e.g. rank 5 in order to get a smooth curve, i could start right from the beginning with only very few but therefore very flexible funktions (litle similar to box-plot) which adopt themselve automaticaly to an optimal fitt and r-squered. can anyone tell me if such a flexible adoptive function also exists in r+? (i could not find anything on the r+ pages with these search words). waiting desperately for help joerg __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] size of graphics device
Dear all, In many cases, I need a plotting region much bigger than the screen (e.g. for maps or for graphs with many labels). if I try windows(width=15, height=15, rescale=fixed) it seems to be OK (a screen with scrollbars, exactly what I need) but if I try then plot(faithful$eruptions, faithful$waiting) I receive Error in plot.new() : Outer margins too large (fig.region too small) Is there a solution ? with many thanks in advance Alain Guerreau directeur de recherche au CNRS Paris [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] RE: packaged datasets in .csv format (David Firth)
Andreas Christmann wrote: -- Message: 1 Date: Wed, 9 Jul 2003 10:53:27 +0100 From: David Firth [EMAIL PROTECTED] Subject: [R] packaged datasets in .csv format To: [EMAIL PROTECTED] Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=US-ASCII; format=flowed A couple of questions in connection with using .csv format to include data in a package: First, the background. The data() function loads data from .csv (comma-separated values) files using read.table(..., header = TRUE, sep = ;) But ?read.table says ## To write a CSV file for input to Excel one might use write.table(x, file = foo.csv, sep = ,, col.names = NA) ## and to read this file back into R one needs read.table(file.csv, header = TRUE, sep = ,, row.names=1) As a result, .csv files created by write.table() as above are not read in by data() in the way that might be expected [that is, expected by someone who had not read help(data)!] Two questions, then: -- is there some compelling reason for the use of `sep = ;' in place of `sep = ,, row.names=1'? Do you really want an answer? Today, one reason is compatibility to all the other packages on CRAN. I prefer ; instead of , , because in text variables there are often ,. That's why text variables can be quoted. -- if I want to maintain a dataset in .csv format, for use both in R and in other systems such as Excel, SPSS, etc, what is the best way to go about it? When regularly using that many systems on the same data sets, it might be worth using a database system, e.g. MySQL. BTW: R *and* Excel *and* (for sure, but I haven't tested) also SPSS can read a couple of different ASCII formatted files, so there are quite a lot possible formats. Uwe Ligges Depends. Perhaps it is best to check it out for the software packages and the versions of the software packages you are using. Andreas Christmann Any advice would be much appreciated. Cheers, David __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] XML Package.
Hi! I have installed the new R on windows. I wanted to reinstall the XML package. I am not able to find the XML.zip anymore. I am quite shure that they where a windows binary version. Has anyone old XML windows binary? Eryk Dipl. bio-chem. Eryk Witold Wolski@MPI-MG Dep. Vertebrate Genomics Ihnestrasse 73 14195 Berlin 'v' tel: 0049-30-84131285 / \ mail: [EMAIL PROTECTED]---W-W [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] XML Package.
Eryk, If you go here on the CRAN, you should be able to find an XML.zip /pub/languages/R/CRAN/bin/windows/contrib HTH steve Wolski wrote: Hi! I have installed the new R on windows. I wanted to reinstall the XML package. I am not able to find the XML.zip anymore. I am quite shure that they where a windows binary version. Has anyone old XML windows binary? Eryk Dipl. bio-chem. Eryk Witold Wolski@MPI-MG Dep. Vertebrate Genomics Ihnestrasse 73 14195 Berlin 'v' tel: 0049-30-84131285 / \ mail: [EMAIL PROTECTED]---W-W [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] XML Package.
Brian Ripley has kindly compiled the package for Windows and has made it available at http://www.stats.ox.ac.uk/pub/RWin along with selected other packages. D. Wolski wrote: Hi! I have installed the new R on windows. I wanted to reinstall the XML package. I am not able to find the XML.zip anymore. I am quite shure that they where a windows binary version. Has anyone old XML windows binary? Eryk Dipl. bio-chem. Eryk Witold Wolski@MPI-MG Dep. Vertebrate Genomics Ihnestrasse 73 14195 Berlin 'v' tel: 0049-30-84131285 / \ mail: [EMAIL PROTECTED]---W-W [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help -- ___ Duncan Temple Lang[EMAIL PROTECTED] Bell Labs, Lucent Technologiesoffice: (908)582-3217 700 Mountain Avenue, Room 2C-259 fax:(908)582-3340 Murray Hill, NJ 07974-2070 http://cm.bell-labs.com/stat/duncan __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] group sequential and adaptive designs
Hello R users, I am looking for R (or S) code related to group sequential or adaptive designs for clinical trials. (The most prominent examples are the designs of Pocock or O'Brien/Fleming, the alpha-spending function approach, or Fisher's combination test and the inverse normal method.) I am particularly interested in the calculation of the critical boundaries, the handling of spending functions and, most of all, power calculations. All I could find were announcements of courses or postings related to the S-Plus SeqTrial module. No code. Can anyone give a hint? Many thanks in advance, Marc -- Jetzt ein- oder umsteigen und USB-Speicheruhr als Prämie sichern! __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] Simple linear regression
KKWa == Ko-Kang Kevin Wang [EMAIL PROTECTED] on Thu, 10 Jul 2003 23:00:00 +1200 (NZST) writes: KKWa Try: ?lm no. see below KKWa On 10 Jul 2003, Gorazd Brumen wrote: Date: 10 Jul 2003 12:54:46 +0200 From: Gorazd Brumen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [R] Simple linear regression Dear all, My friend wants to fit a model of the type z = a x^n y^m + b, where x, y, z are data and a, b, n, m are unknown parameters. How can he transform this to fit in the linear regression framework? Any help would be appreciated. He can't. When all 4 a, b, n, m are parameters, this is a non-linear regression problem. -- Function nls() Now, effectively 2 of the 4 are linear, 2 are non linear; such a problem is denoted as `` partially linear least-squares '' In such a case it's quite important (for efficiency and inference reasons) to make use of this fact. --- use nls(, method = plinear , ) Regards, Martin Maechler [EMAIL PROTECTED] http://stat.ethz.ch/~maechler/ Seminar fuer Statistik, ETH-Zentrum LEO C16Leonhardstr. 27 ETH (Federal Inst. Technology) 8092 Zurich SWITZERLAND phone: x-41-1-632-3408 fax: ...-1228 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] Does anyone know R interface for METIS(graph partioningprogram)?
Hi. (B (B Does anyone know availability of R interface for (BMETIS(http://www-users.cs.umn.edu/~karypis/metis/index.html, graph (Bpartioning program)? (B (B I think METIS is very useful for routing analysis(finding shortest path) (Bfor more than 10 thousands nodes. (B (B Regards. (B (B__ (B[EMAIL PROTECTED] mailing list (Bhttps://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] XML Package.
Stephen C. Upton wrote: Eryk, If you go here on the CRAN, you should be able to find an XML.zip /pub/languages/R/CRAN/bin/windows/contrib a) That directory is of your local CRAN mirror, please use soemthing like CRAN/bin/windows/contrib as a mirror-independent way to specify the location. b) That locations contains only binary versions for R 1.7.0, so it is *not appropriate* for a recent installation. For R-1.7.x, CRAN/bin/windows/contrib/1.7 is the right place to look into. c) Everything is clear when reading the ReadMe which points out the answer Duncan Temple Lang already has given: The packages SJava, XML, netCDF, and xgobi are available at http://www.stats.ox.ac.uk/pub/RWin kindly provided by Professor Brian D. Ripley. These packages are not available from CRAN, because they don't compile out of the box with my automated scripts on my machine. Uwe Ligges HTH steve Wolski wrote: Hi! I have installed the new R on windows. I wanted to reinstall the XML package. I am not able to find the XML.zip anymore. I am quite shure that they where a windows binary version. Has anyone old XML windows binary? Eryk Dipl. bio-chem. Eryk Witold Wolski@MPI-MG Dep. Vertebrate Genomics Ihnestrasse 73 14195 Berlin 'v' tel: 0049-30-84131285 / \ mail: [EMAIL PROTECTED]---W-W [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] The question is on Symmetry model for square table.
Please help, I tried a program on S-plus, and it worked. Also I tried the same program on R but not worked. Here is the programme. I put it in a function form. The model and assumption are at the bottom. where counts-c(22,2,2,0,5,7,14,0,0,2,36,0,0,1,17,10) which is name.data, i is row size and j is the column size. symmetry function(i, j, name.data) { row - (c(1:i)) col - (c(1:j)) name.data - expand.grid(A = row, B = col) name.data$counts - c(counts) name.data$symm - paste(pmin(as.numeric(name.data$A), as.numeric(name.data$B)), pmax(as.numeric(name.data$A), as.numeric(name.data$B)), sep = ,) symmetry - glm(counts ~ symm, family = poisson(link = log), data = name.data) } summary(symmetry(4,4,counts)) Call: glm(formula = counts ~ symm, family = poisson(link = log), data = name.data) Deviance Residuals: Min 1Q Median3Q Max -4.123106 -0.9044956 -3.846197e-008 0.6543513 2.562617 Coefficients: Value Std. Errort value (Intercept) 0.7912419 2.1128915 0.3744830 symm1 -0.9191397 0.2169745 -4.2361653 symm2 -0.7239676 0.2465491 -2.9364038 symm3 -2.3094242 5.2703608 -0.4381909 symm4 0.5614798 1.0575027 0.5309488 symm5 0.3965751 0.7045443 0.5628817 symm6 -0.1128162 0.5223163 -0.2159920 symm7 0.4499711 0.3777980 1.1910362 symm8 0.1895939 0.2946399 0.6434767 symm9 0.1679270 0.2368599 0.7089720 (Dispersion Parameter for Poisson family taken to be 1 ) Null Deviance: 190.398 on 15 degrees of freedom Residual Deviance: 39.17989 on 6 degrees of freedom Number of Fisher Scoring Iterations: 6 _ Also in R. program, here is the same program together with the complain. name.data=counts (above). symmetry function(i,j,name.data){ A-(c(1:i)) B-(c(1:j)) name.data-expand.grid(A=A,B=B) name.data$counts-(c(counts)) name.data$symm-paste(pmin(as.numeric(name.data$A),as.numeric(name.data$B)), pmax(as.numeric(name.data$A),as.numeric(name.data$B)),sep=,) symmetry-glm(counts~symm,data=name.data,family=poisson(link=log)) } symmetry(4,4,counts) Error in model.frame(formula, rownames, variables, varnames, extras, extranames, : invalid variable type I tried to print out the table with symm pathern. and the function for symm below. i-4 j-4 A-(c(1:i)) B-(c(1:j)) name.data-expand.grid(A=A,B=B) name.data$counts-(c(counts)) name.data$symm-paste(pmin(as.numeric(name.data$A),as.numeric(name.data$B)), + pmax(as.numeric(name.data$A),as.numeric(name.data$B)),sep=,) name.data A B counts symm 1 1 1 22 1,1 2 2 1 2 1,2 3 3 1 2 1,3 4 4 1 0 1,4 5 1 2 5 1,2 6 2 2 7 2,2 7 3 2 14 2,3 8 4 2 0 2,4 9 1 3 0 1,3 10 2 3 2 2,3 11 3 3 36 3,3 12 4 3 0 3,4 13 1 4 0 1,4 14 2 4 1 2,4 15 3 4 17 3,4 16 4 4 10 4,4 symm function (x, levels = sort(unique.default(x), na.last = TRUE), labels = levels, exclude = NA, ordered = is.ordered(x)) { if (is.null(x)) x - list() exclude - as.vector(exclude, typeof(x)) levels - levels[is.na(match(levels, exclude))] f - match(x, levels) names(f) - names(x) nl - length(labels) attr(f, levels) - if (nl == length(levels)) as.character(labels) else if (nl == 1) paste(labels, seq(along = levels), sep = ) else stop(paste(invalid labels; length, nl, should be 1 or, length(levels))) class(f) - c(if (ordered) ordered, factor) f } - The model and Assumptions log(m_ij)= lambda + lambda_i + lambda_j + lambda_ij where, lambda_ij = lambda_ji for i not equal to j and lambda_i(A) = lambda_i(B) Likelihood equation is m_ij =(n_ij + n_ji)/2 For symmetry m_(ij)=m_(ji) R program does not recognised symm pathern, that is (1,1), (1,2) and so on but S-plus do. So please I need your assistance. Thanks for your usual contibutions. Yours Sola. -- - Adebowale Olusola Adejumo Department of Statistics LMU,University of Muenchen Ludwigstraße 33/III D - 80539 München Germany. Tel: ++49 89 2180 3165 Fax: ++49 89 2180 5042 http://www.stat.uni-muenchen.de/ __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] group sequential and adaptive designs
On Thu, 10 Jul 2003 14:13:20 +0200 (MEST) Marc Vandemeulebroecke [EMAIL PROTECTED] wrote: Hello R users, I am looking for R (or S) code related to group sequential or adaptive designs for clinical trials. (The most prominent examples are the designs of Pocock or O'Brien/Fleming, the alpha-spending function approach, or Fisher's combination test and the inverse normal method.) I am particularly interested in the calculation of the critical boundaries, the handling of spending functions and, most of all, power calculations. All I could find were announcements of courses or postings related to the S-Plus SeqTrial module. No code. Can anyone give a hint? Many thanks in advance, Marc If you get the U. of Wisconsin Biostatistics program ld98 executable, which implements several spending functions in the Lan DeMets paradigm, you can use the S function ldBands and its plot and summary methods, which call ld98. ldBands is in the Hmisc package at http://hesweb1.med.virginia.edu/biostat/s/Hmisc.html ldBands works under Linux/Unix but has not been tested under Windows yet. Get ld98 and its documentation from http://www.medsch.wisc.edu/landemets ldBands makes ld98 easier to use. Examples show how to do power calculations. --- Frank E Harrell Jr Prof. of Biostatistics Statistics Div. of Biostatistics Epidem. Dept. of Health Evaluation Sciences U. Virginia School of Medicine http://hesweb1.med.virginia.edu/biostat __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] packaged datasets in .csv format (David Firth)
Many thanks to those who replied to my question. Dirk's suggestion, to use a .R file in the data directory of the package, specifying how the .csv should be read, works fine as an answer to the question about making comma-separated files available. Uwe's answer to my other question (; vs ,), ie compatibility with existing R packages, is well taken! Cheers, David On Thursday, Jul 10, 2003, at 12:25 Europe/London, Uwe Ligges wrote: Andreas Christmann wrote: - - Message: 1 Date: Wed, 9 Jul 2003 10:53:27 +0100 From: David Firth [EMAIL PROTECTED] Subject: [R] packaged datasets in .csv format To: [EMAIL PROTECTED] Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=US-ASCII; format=flowed A couple of questions in connection with using .csv format to include data in a package: First, the background. The data() function loads data from .csv (comma-separated values) files using read.table(..., header = TRUE, sep = ;) But ?read.table says ## To write a CSV file for input to Excel one might use write.table(x, file = foo.csv, sep = ,, col.names = NA) ## and to read this file back into R one needs read.table(file.csv, header = TRUE, sep = ,, row.names=1) As a result, .csv files created by write.table() as above are not read in by data() in the way that might be expected [that is, expected by someone who had not read help(data)!] Two questions, then: -- is there some compelling reason for the use of `sep = ;' in place of `sep = ,, row.names=1'? Do you really want an answer? Today, one reason is compatibility to all the other packages on CRAN. I prefer ; instead of , , because in text variables there are often ,. That's why text variables can be quoted. -- if I want to maintain a dataset in .csv format, for use both in R and in other systems such as Excel, SPSS, etc, what is the best way to go about it? When regularly using that many systems on the same data sets, it might be worth using a database system, e.g. MySQL. BTW: R *and* Excel *and* (for sure, but I haven't tested) also SPSS can read a couple of different ASCII formatted files, so there are quite a lot possible formats. Uwe Ligges Depends. Perhaps it is best to check it out for the software packages and the versions of the software packages you are using. Andreas Christmann Any advice would be much appreciated. Cheers, David __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
RE: [R] please help on frag polynoms
I'm guessing you meant fracpoly in Stata, which is fractional polynomial smoothing. If that's the case, check out http://www.homepages.ucl.ac.uk/~ucakgam/r/. Andy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, July 10, 2003 4:53 AM To: [EMAIL PROTECTED] Subject: [R] please help on frag polynoms hi there, can anyone help me on the topic of frag polynoms? i just heard of a friend of mine, that i could build in a functioon called fragpoly (he was talking of such a function in the 'stata' language) in order to improve my process of finding an optimal linear model. instead of trying a vast amount of transformed inputdata to find the best fit and then step backwards down to e.g. rank 5 in order to get a smooth curve, i could start right from the beginning with only very few but therefore very flexible funktions (litle similar to box-plot) which adopt themselve automaticaly to an optimal fitt and r-squered. can anyone tell me if such a flexible adoptive function also exists in r+? (i could not find anything on the r+ pages with these search words). waiting desperately for help joerg __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo /r-help -- Notice: This e-mail message, together with any attachments, ...{{dropped}} __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] Maximum Likelihood Estimation and Optimisation
Hello, I want to calculate a maximum likelihood funktion in R in order to solve for the parameters of an estimator. Is there an easy way to do this in R? How do I get the parameters and the value of the maximum likelihood funktion. More, I want to specify the algorithm of the optimisation above: BHHH (Berndt Hall Hall Hausman). Is this possible? Thanks a lot for your help and best regards Marc - Marc Fohr, CFA Equity Portfolio Manager First Private Investment Management Neue Mainzer Strasse 75 D-60311 Frankfurt/Main Phone: ++49 - 69 - 2607 5424 Fax: ++49 - 69 - 2607 5440 Email: [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
RE: [R] Maximum Likelihood Estimation and Optimisation
Well, lm() produces an OLS solution, which are also MLE solutions for the fixed effects. I think this is an easy way, although maybe not the best. BHHH is a numerical approximation that can be used when a closed form solution is not available. It is less sophisticated than Newton-Raphson. Is this helpful? -- Harold C. Doran Director of Research and Evaluation New American Schools 675 N. Washington Street, Suite 220 Alexandria, Virginia 22314 703.647.1628 -Original Message- From: Fohr, Marc [AM] [mailto:[EMAIL PROTECTED] Sent: Thursday, July 10, 2003 10:17 AM To: [EMAIL PROTECTED] Subject: [R] Maximum Likelihood Estimation and Optimisation Hello, I want to calculate a maximum likelihood funktion in R in order to solve for the parameters of an estimator. Is there an easy way to do this in R? How do I get the parameters and the value of the maximum likelihood funktion. More, I want to specify the algorithm of the optimisation above: BHHH (Berndt Hall Hall Hausman). Is this possible? Thanks a lot for your help and best regards Marc - Marc Fohr, CFA Equity Portfolio Manager First Private Investment Management Neue Mainzer Strasse 75 D-60311 Frankfurt/Main Phone: ++49 - 69 - 2607 5424 Fax: ++49 - 69 - 2607 5440 Email: [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] Simple linear regression
Martin Maechler [EMAIL PROTECTED] writes: KKWa == Ko-Kang Kevin Wang [EMAIL PROTECTED] on Thu, 10 Jul 2003 23:00:00 +1200 (NZST) writes: KKWa Try: ?lm no. see below KKWa On 10 Jul 2003, Gorazd Brumen wrote: Date: 10 Jul 2003 12:54:46 +0200 From: Gorazd Brumen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [R] Simple linear regression Dear all, My friend wants to fit a model of the type z = a x^n y^m + b, where x, y, z are data and a, b, n, m are unknown parameters. How can he transform this to fit in the linear regression framework? Any help would be appreciated. He can't. When all 4 a, b, n, m are parameters, this is a non-linear regression problem. -- Function nls() Now, effectively 2 of the 4 are linear, 2 are non linear; such a problem is denoted as `` partially linear least-squares '' In such a case it's quite important (for efficiency and inference reasons) to make use of this fact. --- use nls(, method = plinear , ) I think it should be 'algorithm = plinear' The full call would be something like nls(z ~ cbind(x^n*y^m, 1), data = mydata, start=c(n = 1.0, m = 2.0), algorithm = plinear) Must the exponents n and m be positive? If so, I recommend using the logarithm of the exponents as the parameters in the optimization nls(z ~ cbind(x^exp(logn)*y^exp(logm), 1), data = mydata, start=c(logn = 0., logm = log(2.0)), algorithm = plinear) __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
FW: [R] Maximum Likelihood Estimation and Optimisation
Have a look at ?optim. I don't think it has the BHHH algorithm as an option, though. === David Barron Jesus College University of Oxford -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Harold Doran Sent: 10 July 2003 15:43 To: Fohr, Marc [AM]; [EMAIL PROTECTED] Subject: RE: [R] Maximum Likelihood Estimation and Optimisation Well, lm() produces an OLS solution, which are also MLE solutions for the fixed effects. I think this is an easy way, although maybe not the best. BHHH is a numerical approximation that can be used when a closed form solution is not available. It is less sophisticated than Newton-Raphson. Is this helpful? -- Harold C. Doran Director of Research and Evaluation New American Schools 675 N. Washington Street, Suite 220 Alexandria, Virginia 22314 703.647.1628 -Original Message- From: Fohr, Marc [AM] [mailto:[EMAIL PROTECTED] Sent: Thursday, July 10, 2003 10:17 AM To: [EMAIL PROTECTED] Subject: [R] Maximum Likelihood Estimation and Optimisation Hello, I want to calculate a maximum likelihood funktion in R in order to solve for the parameters of an estimator. Is there an easy way to do this in R? How do I get the parameters and the value of the maximum likelihood funktion. More, I want to specify the algorithm of the optimisation above: BHHH (Berndt Hall Hall Hausman). Is this possible? Thanks a lot for your help and best regards Marc - Marc Fohr, CFA Equity Portfolio Manager First Private Investment Management Neue Mainzer Strasse 75 D-60311 Frankfurt/Main Phone: ++49 - 69 - 2607 5424 Fax: ++49 - 69 - 2607 5440 Email: [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] GLS in R
do I choleski decompose the inverse of the covariance matrix and weight the observations - risking precision loss. - I think you'd be better off choleski decomposing the cov matrix itself wouldn't you? e.g. if V is the covariance matrix use chol() to get V=L^T L and then form L^{-T}y and L^{-T}X using solve() (assuming model is y=Xb+e). Simon _ Simon Wood [EMAIL PROTECTED]www.stats.gla.ac.uk/~simon/ Department of Statistics, University of Glasgow, Glasgow, G12 8QQ Direct telephone: (0)141 330 4530 Fax: (0)141 330 4814 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] Maximum Likelihood Estimation and Optimisation
It is not obvious to me what parameters in what model you want to fit. Function optim does very well with many different kinds of problems. If you just want to estimate parameters of a probability distribution, function fitdistr in library(MASS) will do that. A couple of days ago, I needed to fit a Pareto distribution of the first kind. A search of www.r-project.org - search - R site search uncovered functions for a Pareto distribtion of a different kind. So, I wrote the following and used them to check fitdistr and then to actually fit the distribution to data. hope this helps. spencer graves # dpareto - function(x, shape, x0, log=FALSE){ dp - if(log) (log(shape-1)-shape*log(x/x0)-log(x0)) else ((shape-1)*((x0/x)^shape)/x0) dp[xx0] - 0 dp } ppareto - function(q, shape, x0, lower.tail = TRUE, log.p=FALSE){ q - pmax(x0, q) if(log.p){ if(lower.tail){ return(log(ppareto(q, shape, x0))) } else return((shape-1)*log(x0/q)) } else{ S.q - (x0/q)^(shape-1) if(lower.tail)return(1-S.q) else return(S.q) } } qpareto - function(p, shape, x0, lower.tail=TRUE){ if(lower.tail) p - (1-p) x0*exp(-log(p)/(shape-1)) } rpareto - function(n, shape, x0) qpareto(runif(n), shape, x0, lower.tail=FALSE) fitdistr(rpareto(1, 3, 1), dpareto, list(shape=2.5), x0=1) Harold Doran wrote: Well, lm() produces an OLS solution, which are also MLE solutions for the fixed effects. I think this is an easy way, although maybe not the best. BHHH is a numerical approximation that can be used when a closed form solution is not available. It is less sophisticated than Newton-Raphson. Is this helpful? -- Harold C. Doran Director of Research and Evaluation New American Schools 675 N. Washington Street, Suite 220 Alexandria, Virginia 22314 703.647.1628 -Original Message- From: Fohr, Marc [AM] [mailto:[EMAIL PROTECTED] Sent: Thursday, July 10, 2003 10:17 AM To: [EMAIL PROTECTED] Subject: [R] Maximum Likelihood Estimation and Optimisation Hello, I want to calculate a maximum likelihood funktion in R in order to solve for the parameters of an estimator. Is there an easy way to do this in R? How do I get the parameters and the value of the maximum likelihood funktion. More, I want to specify the algorithm of the optimisation above: BHHH (Berndt Hall Hall Hausman). Is this possible? Thanks a lot for your help and best regards Marc - Marc Fohr, CFA Equity Portfolio Manager First Private Investment Management Neue Mainzer Strasse 75 D-60311 Frankfurt/Main Phone: ++49 - 69 - 2607 5424 Fax: ++49 - 69 - 2607 5440 Email: [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] The question is on Symmetry model for square table.
Did you try traceback()? This might help you identify the offending line in your function. If that doesn't help, I step through the function one line at a time (copy and paste from an editor) until R bombs on me. If it doesn't bomb, then there is a scoping problem: Are you using global variables in a function? If yes, pass them explicitly as arguments. I recently potentially similar problems this way. hope this helps. spencer graves Adejumo Adebowale Olusola wrote: Please help, I tried a program on S-plus, and it worked. Also I tried the same program on R but not worked. Here is the programme. I put it in a function form. The model and assumption are at the bottom. where counts-c(22,2,2,0,5,7,14,0,0,2,36,0,0,1,17,10) which is name.data, i is row size and j is the column size. symmetry function(i, j, name.data) { row - (c(1:i)) col - (c(1:j)) name.data - expand.grid(A = row, B = col) name.data$counts - c(counts) name.data$symm - paste(pmin(as.numeric(name.data$A), as.numeric(name.data$B)), pmax(as.numeric(name.data$A), as.numeric(name.data$B)), sep = ,) symmetry - glm(counts ~ symm, family = poisson(link = log), data = name.data) } summary(symmetry(4,4,counts)) Call: glm(formula = counts ~ symm, family = poisson(link = log), data = name.data) Deviance Residuals: Min 1Q Median3Q Max -4.123106 -0.9044956 -3.846197e-008 0.6543513 2.562617 Coefficients: Value Std. Errort value (Intercept) 0.7912419 2.1128915 0.3744830 symm1 -0.9191397 0.2169745 -4.2361653 symm2 -0.7239676 0.2465491 -2.9364038 symm3 -2.3094242 5.2703608 -0.4381909 symm4 0.5614798 1.0575027 0.5309488 symm5 0.3965751 0.7045443 0.5628817 symm6 -0.1128162 0.5223163 -0.2159920 symm7 0.4499711 0.3777980 1.1910362 symm8 0.1895939 0.2946399 0.6434767 symm9 0.1679270 0.2368599 0.7089720 (Dispersion Parameter for Poisson family taken to be 1 ) Null Deviance: 190.398 on 15 degrees of freedom Residual Deviance: 39.17989 on 6 degrees of freedom Number of Fisher Scoring Iterations: 6 _ Also in R. program, here is the same program together with the complain. name.data=counts (above). symmetry function(i,j,name.data){ A-(c(1:i)) B-(c(1:j)) name.data-expand.grid(A=A,B=B) name.data$counts-(c(counts)) name.data$symm-paste(pmin(as.numeric(name.data$A),as.numeric(name.data$B)), pmax(as.numeric(name.data$A),as.numeric(name.data$B)),sep=,) symmetry-glm(counts~symm,data=name.data,family=poisson(link=log)) } symmetry(4,4,counts) Error in model.frame(formula, rownames, variables, varnames, extras, extranames, : invalid variable type I tried to print out the table with symm pathern. and the function for symm below. i-4 j-4 A-(c(1:i)) B-(c(1:j)) name.data-expand.grid(A=A,B=B) name.data$counts-(c(counts)) name.data$symm-paste(pmin(as.numeric(name.data$A),as.numeric(name.data$B)), + pmax(as.numeric(name.data$A),as.numeric(name.data$B)),sep=,) name.data A B counts symm 1 1 1 22 1,1 2 2 1 2 1,2 3 3 1 2 1,3 4 4 1 0 1,4 5 1 2 5 1,2 6 2 2 7 2,2 7 3 2 14 2,3 8 4 2 0 2,4 9 1 3 0 1,3 10 2 3 2 2,3 11 3 3 36 3,3 12 4 3 0 3,4 13 1 4 0 1,4 14 2 4 1 2,4 15 3 4 17 3,4 16 4 4 10 4,4 symm function (x, levels = sort(unique.default(x), na.last = TRUE), labels = levels, exclude = NA, ordered = is.ordered(x)) { if (is.null(x)) x - list() exclude - as.vector(exclude, typeof(x)) levels - levels[is.na(match(levels, exclude))] f - match(x, levels) names(f) - names(x) nl - length(labels) attr(f, levels) - if (nl == length(levels)) as.character(labels) else if (nl == 1) paste(labels, seq(along = levels), sep = ) else stop(paste(invalid labels; length, nl, should be 1 or, length(levels))) class(f) - c(if (ordered) ordered, factor) f } - The model and Assumptions log(m_ij)= lambda + lambda_i + lambda_j + lambda_ij where, lambda_ij = lambda_ji for i not equal to j and lambda_i(A) = lambda_i(B) Likelihood equation is m_ij =(n_ij + n_ji)/2 For symmetry m_(ij)=m_(ji) R program does not recognised symm pathern, that is (1,1), (1,2) and so on but S-plus do. So please I need your assistance. Thanks for your usual contibutions. Yours Sola. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] Simple linear regression
Dear all, Thank you all a lot for the help. The commands given by prof. Bates were the most direct way to the solution of the problem. Once again thank you all, Gorazd Brumen V et, 10.07.2003 ob 16:42, je Douglas Bates poslal(a): Martin Maechler [EMAIL PROTECTED] writes: KKWa == Ko-Kang Kevin Wang [EMAIL PROTECTED] on Thu, 10 Jul 2003 23:00:00 +1200 (NZST) writes: KKWa Try: ?lm no. see below KKWa On 10 Jul 2003, Gorazd Brumen wrote: Date: 10 Jul 2003 12:54:46 +0200 From: Gorazd Brumen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [R] Simple linear regression Dear all, My friend wants to fit a model of the type z = a x^n y^m + b, where x, y, z are data and a, b, n, m are unknown parameters. How can he transform this to fit in the linear regression framework? Any help would be appreciated. He can't. When all 4 a, b, n, m are parameters, this is a non-linear regression problem. -- Function nls() Now, effectively 2 of the 4 are linear, 2 are non linear; such a problem is denoted as `` partially linear least-squares '' In such a case it's quite important (for efficiency and inference reasons) to make use of this fact. --- use nls(, method = plinear , ) I think it should be 'algorithm = plinear' The full call would be something like nls(z ~ cbind(x^n*y^m, 1), data = mydata, start=c(n = 1.0, m = 2.0), algorithm = plinear) Must the exponents n and m be positive? If so, I recommend using the logarithm of the exponents as the parameters in the optimization nls(z ~ cbind(x^exp(logn)*y^exp(logm), 1), data = mydata, start=c(logn = 0., logm = log(2.0)), algorithm = plinear) -- Mail 1: [EMAIL PROTECTED] Mail 2: [EMAIL PROTECTED] Tel.: +41 (0)1 63 34906 Homepage: valjhun.fmf.uni-lj.si/~brumen __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] A problem with using the outer function
On Wed, 9 Jul 2003, Duncan Murdoch wrote: On Wed, 09 Jul 2003 15:33:11 -0400, Ravi Varadhan [EMAIL PROTECTED] wrote : Hi: I am using R 1.7.0 on Windows. I am having trouble getting outer to work on one of my functions. Most likely the problem is that the function you give doesn't work on array arguments. Your function needs to take two arrays of the same shape as the first two arguments, and return an array of answers. outer() doesn't work by looping, it works by constructing big arrays of inputs and making just one function call. Two further notes: 1/ This is in the FAQ. 2/ It is possible to use mapply() to vectorise an arbitrary function. There isn't any speed advantage in doing so, but it will then work with outer(). -thomas Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] please help on frag polynoms
On Thu, 10 Jul 2003 [EMAIL PROTECTED] wrote: hi there, can anyone help me on the topic of frag polynoms? I don't think there is anything currently available for fractional polynomials along the lines of -fracpoly- in Stata. You could construct an equivalent fairly easily using step(), or you could use local polynomials or splines. -thomas Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] Help with R Installation on Debian 2.2.19 (old stable/potato)
Hi all, I hope this is the correct list to post such a question. I was trying to install the R-project on Debian and encountered significant problems with the same. The main problem is the installation of the libc6 package. I need this package in order to install the R-core package. However, the libc6 is dependent on the libdb1-compat package, which just refuses to install on my server. I tried to install it yesterday and it ended up crashing my system and messing up the old Apache. Does anyone have a procedure to install R-project on Debian linux? The libdb1-compat package version is 2.1.3-7 and the libc6 is 2.3.1-17 Please advise, TIA Shashank Shashank Bhide Oklahoma State University 405 744 7103 (Off) 405 744 7799 (Fax) __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] Re: Help with R Installation on Debian 2.2.19 (oldstable/potato)
Shashank Bhide writes: Hi all, I hope this is the correct list to post such a question. I was trying to install the R-project on Debian and encountered significant problems with the same. The main problem is the installation of the libc6 package. I need this package in order to install the R-core package. However, the libc6 is dependent on the libdb1-compat package, which just refuses to install on my server. I tried to install it yesterday and it ended up crashing my system and messing up the old Apache. Does anyone have a procedure to install R-project on Debian linux? The libdb1-compat package version is 2.1.3-7 and the libc6 is 2.3.1-17 Please advise, one way is to add the following line (for woody as an ex.) deb http://cran.r-project.org/bin/linux/debian woody main to your /etc/apt/sources.list and use apt-get install r-base .. .etc. TIA Shashank Shashank Bhide Oklahoma State University 405 744 7103 (Off) 405 744 7799 (Fax) __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] Version Number of a Package
Hello, Apologies if this is a stupid question. I googled and skimmed the archives and didn't see anything specific about this. I am documenting an analysis procedure in a DB and I would like to know the specific version number of each package that I use. Is there a standardized way of getting that information out from R, or should I parse it out from the source-code files? Ideally I would like a function like this: myVerNum - Version(package.names); Any guidance, direction, or suggestions are very much appreciated! Paul This mail sent through www.mywaterloo.ca __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] Help with R Installation on Debian 2.2.19 (old stable/potato)
I have avoided crossing Debian versions (eg, installing woody packages over a Debian potato distribution) unless I do a full upgrade to, eg, woody. However, R was and is available for the Debian potato version, but it is version 0.90. If you would be satisfied with that version, and I got good use out of that version, and even out of the earlier version 0.61, try an ordinary Debian package insallation with apt. apt-get update #updates available Debian packages apt-get install r-base This adds any necessary libraries, but only libraries consistent with the Debian potato version. It presumes you already have a working /etc/apt/sources.list , eg, with a line like deb http://debian.rutgers.edu potato main contrib non-free Alternatively, you can get this potato package directly at http://debian.rutgers.edu/dists/potato/main/binary-i386/math/ looking for packages beginning with r-. For example, you could cd /tmp wget http://debian.rutgers.edu/dists/potato/main/binary-i386/math/r-base_0.90.1-2.deb dpkg -i r-base_0.90.1-2.deb In the next version of Debian, woody, all the following package names are available, but not in potato. You should be able to install (dpkg -i package-name.deb) documentation packages like r-doc-pdf from later Debian versions into you potato version, but you can also get that documentation directly from R's webpages. * r-gnome Gnome gui for statistical computing system r-mathlib standalone mathematics library r-recommended collection of recommended packages r-base-dev installation of auxiliary GNU R packages r-base-html html docs for statistical computing system functions r-base-latexLaTeX docs for statistical computing system functions r-doc-html html manuals for statistical computing system r-doc-info info manuals statistical computing system r-doc-pdf pdf manuals for statistical computing system On Thu, Jul 10, 2003 at 10:47:58AM -0500, Shashank Bhide wrote: Hi all, I hope this is the correct list to post such a question. I was trying to install the R-project on Debian and encountered significant problems with the same. The main problem is the installation of the libc6 package. I need this package in order to install the R-core package. However, the libc6 is dependent on the libdb1-compat package, which just refuses to install on my server. I tried to install it yesterday and it ended up crashing my system and messing up the old Apache. Does anyone have a procedure to install R-project on Debian linux? The libdb1-compat package version is 2.1.3-7 and the libc6 is 2.3.1-17 -- Jameson C. Burt, NJ9L Fairfax, Virginia, USA [EMAIL PROTECTED] http://www.coost.com (202) 690-0380 (work) LTSP.org: magic mysterious and awe-inspiring even though we know they are real and not supernatural __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] Contour Plots
Hello, I'm a grad. student in statistics and am looking for some information on how R draws its contours. I suspect you are using a Bezier spline. I have the C code but am curious about how it works. Riley A. Metzger University of Waterloo Waterloo, Ontario, N2L 3G1 (519) 888-4567 Ext. 3715 [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] ordering of alphanumeric strings
I would be very surprised if any version of R ever ordered strings in the manner you want. R has no way of knowing that some digit strings nestled amongst alphabetic characters should be treated as numbers. To achieve what you want you need to parse the strings yourself, e.g.: x - c(ABC 10, ABC 2) x1 - do.call(rbind, strsplit(x, )) x2 - list(x1[,1], as.numeric(as.character(x1[,2]))) do.call(order, x2) [1] 2 1 The above will only work if each element of 'x' has the same number of spaces in it (i.e., splitting on a space breaks each element into the same number of components). hope this helps, Tony Plate At Thursday 04:37 PM 7/10/2003 -0400, kschlauc wrote: Can someone tell me which version of R began to order alpha-numeric strings in this manner: ABC 10 ABC 2 rather than ABC 2 ABC 10 ? And, is there a way to force ABC 2 to be ordered as a value less than ABC 10? thank you, Karen [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] packaged datasets in .csv format (David Firth)
This information and advice is indeed very useful. Some would wonder, however, whether a file delimited with semi- colons can still be called a CSV file. Excel Help has CSV (Comma delimited) format) ;-) Regards, Andrew C. Ward CAPE Centre Department of Chemical Engineering The University of Queensland Brisbane Qld 4072 Australia [EMAIL PROTECTED] Quoting David Firth [EMAIL PROTECTED]: Many thanks to those who replied to my question. Dirk's suggestion, to use a .R file in the data directory of the package, specifying how the .csv should be read, works fine as an answer to the question about making comma-separated files available. Uwe's answer to my other question (; vs ,), ie compatibility with existing R packages, is well taken! Cheers, David On Thursday, Jul 10, 2003, at 12:25 Europe/London, Uwe Ligges wrote: Andreas Christmann wrote: - - Message: 1 Date: Wed, 9 Jul 2003 10:53:27 +0100 From: David Firth [EMAIL PROTECTED] Subject: [R] packaged datasets in .csv format To: [EMAIL PROTECTED] Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=US-ASCII; format=flowed A couple of questions in connection with using .csv format to include data in a package: First, the background. The data() function loads data from .csv (comma-separated values) files using read.table(..., header = TRUE, sep = ;) But ?read.table says ## To write a CSV file for input to Excel one might use write.table(x, file = foo.csv, sep = ,, col.names = NA) ## and to read this file back into R one needs read.table(file.csv, header = TRUE, sep = ,, row.names=1) As a result, .csv files created by write.table() as above are not read in by data() in the way that might be expected [that is, expected by someone who had not read help(data)!] Two questions, then: -- is there some compelling reason for the use of `sep = ;' in place of `sep = ,, row.names=1'? Do you really want an answer? Today, one reason is compatibility to all the other packages on CRAN. I prefer ; instead of , , because in text variables there are often ,. That's why text variables can be quoted. -- if I want to maintain a dataset in .csv format, for use both in R and in other systems such as Excel, SPSS, etc, what is the best way to go about it? When regularly using that many systems on the same data sets, it might be worth using a database system, e.g. MySQL. BTW: R *and* Excel *and* (for sure, but I haven't tested) also SPSS can read a couple of different ASCII formatted files, so there are quite a lot possible formats. Uwe Ligges Depends. Perhaps it is best to check it out for the software packages and the versions of the software packages you are using. Andreas Christmann Any advice would be much appreciated. Cheers, David __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] packaged datasets in .csv format (David Firth)
Andrew C. Ward [EMAIL PROTECTED] writes: This information and advice is indeed very useful. Some would wonder, however, whether a file delimited with semi- colons can still be called a CSV file. Excel Help has CSV (Comma delimited) format) ;-) Well, Excel will itself generate CSV files separated with semicolons in some locales, as far as I know. It doesn't work well to have commas as decimal separator *and* field separator (although I've heard that a version of Paradox did exactly that...) I do often wonder which idiot made CSV files locale dependent, and for what possible reason. -- O__ Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
RE: [R] Version Number of a Package
Thanks to all for the help: works like a charm now. :) Paul -Original Message- From: Jeff Gentry [mailto:[EMAIL PROTECTED] Sent: Thursday, July 10, 2003 4:24 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [R] Version Number of a Package I am documenting an analysis procedure in a DB and I would like to know the specific version number of each package that I use. Is there a standardized way of getting that information out from R, or should I parse it out from the source-code files? Ideally I would like a function like this: myVerNum - Version(package.names); There are a several ways to skin that cat. A few that come to mind are using package.description(): package.description(Biobase)[Version] Version 1.3.27 You can also use installed.packages(): z - installed.packages() z[1,Version] [1] 1.2.28 Also, in the Biobase package in Bioconductor (www.bioconductor.org), there's a function package.version(): package.version(Biobase) [1] 1.3.27 -J __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] R and XP
Jan, perhaps you could give an example of the syntax and output so we can see what the problem is. There are lots of users of R under Windows, so I don't anticipate a major compatibility issue. There have been a number of question on the list about directing input to and from R, so searching the archive may be an option as well. Regards, Andrew C. Ward CAPE Centre Department of Chemical Engineering The University of Queensland Brisbane Qld 4072 Australia [EMAIL PROTECTED] Quoting bart rossel [EMAIL PROTECTED]: Dear whom this may concern, I am having problems running R under windows XP. I can source files and get all the functions loaded, but when directing it to a file to carry out analyses it comes up with an error message. I am using R for analyses of gpr files generated from microarray slides using Axon genepix 2000. I hope you have a solution to my problems. Kind regards, Jan Bart Rossel (PhD Candidate) The Australian National University School of Biochemistry and Molecular Biology Linneaus way, building 41 Canberra, ACT 0200 Australia email: [EMAIL PROTECTED] phone: +61 02 61252663 FAX: +61 02 61250313 [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] FITS File Reader
Dear R users, I have searched the web and CRAN fairly carefully. Does a FITS format file reader for R currently exist that I can download? Thank you! n __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] R and XP
On Fri, 11 Jul 2003 10:58:35 +1000, you wrote: Dear whom this may concern, I am having problems running R under windows XP. I can source files and get all the functions loaded, but when directing it to a file to carry out analyses it comes up with an error message. I am using R for analyses of gpr files generated from microarray slides using Axon genepix 2000. I hope you have a solution to my problems. Generally if you want help, you need to give enough information to people to understand your problem. For example, you need to tell us what you were doing when you saw the error, and what the error message was, in enough detail that we can do the same thing on our machines and see it ourselves. Simplify the task down to something very simple that you think should work but doesn't: often in doing that, you'll figure out what's wrong with what you're doing, and won't need to ask anyone for help. Duncan Murdoch __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] postscript/eps label clipping
The following code produces an eps file with the tops of each of the ylabs clipped off. par(mfrow=c(2,2)) plot(runif(10), ylab=Function(Lengthy Expression),xlab=Prediction) plot(runif(10), ylab=expression(Delta * Beta^2),xlab=Prediction) plot(runif(10), ylab=Function(Lengthy Expression),xlab=Prediction) plot(runif(10), ylab=expression(Delta * Beta^2),xlab=Prediction) dev.print(postscript,file=foo.eps, horizontal=FALSE,onefile=FALSE,paper=special, pointsize=7, width=5,height=4) ?postscript seems to indicate paper=special, width=, height=, and pointsize= are the recommended way to produce nice latex graphics. If I don't set a pointsize, the letters aren't clipped, but the graphs are tiny with respect to the x/y labels. Is there something else I should be adjusting instead? Thanks for your time, Dave -- Dave Forrest(434)924-3954w(111B) (804)642-0662h (804)695-2026p [EMAIL PROTECTED]http://mug.sys.virginia.edu/~drf5n/ __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
RE: [R] postscript/eps label clipping
Never having used postscript as an output method I looked to see what you were talking about. I noted that ps.options needs to be called before calling postscript. ps.options does have pointsize within it and silly though it may seem, its what I would do next. _ Tom Mulholland Senior Policy Officer WA Country Health Service 189 Royal St, East Perth, WA, 6004 Tel: (08) 9222 4062 e-mail: [EMAIL PROTECTED] The contents of this e-mail transmission are confidential and may be protected by professional privilege. The contents are intended only for the named recipients of this e-mail. If you are not the intended recipient, you are hereby notified that any use, reproduction, disclosure or distribution of the information contained in this e-mail is prohibited. Please notify the sender immediately. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, 11 July 2003 1:17 PM To: [EMAIL PROTECTED] Subject: [R] postscript/eps label clipping The following code produces an eps file with the tops of each of the ylabs clipped off. par(mfrow=c(2,2)) plot(runif(10), ylab=Function(Lengthy Expression),xlab=Prediction) plot(runif(10), ylab=expression(Delta * Beta^2),xlab=Prediction) plot(runif(10), ylab=Function(Lengthy Expression),xlab=Prediction) plot(runif(10), ylab=expression(Delta * Beta^2),xlab=Prediction) dev.print(postscript,file=foo.eps, horizontal=FALSE,onefile=FALSE,paper=special, pointsize=7, width=5,height=4) ?postscript seems to indicate paper=special, width=, height=, and pointsize= are the recommended way to produce nice latex graphics. If I don't set a pointsize, the letters aren't clipped, but the graphs are tiny with respect to the x/y labels. Is there something else I should be adjusting instead? Thanks for your time, Dave -- Dave Forrest(434)924-3954w(111B) (804)642-0662h (804)695-2026p [EMAIL PROTECTED]http://mug.sys.virginia.edu/~drf5n/ __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help