Re: [R] Problems loading rjags in R 2.11.0 under OS X 10.5.8

2010-08-27 Thread Prof Brian Ripley
On Fri, 27 Aug 2010, Ruben Garcia Berasategui wrote: Dear list members, I'm trying to use JAGS 2.1.0 from within R but every time I try to load the rjags package I receive the following message: Which version of 'the rjags package' and where did you get it from? I have 2.1.0-6, installed

Re: [R] checking if a package is installed

2010-08-27 Thread Dejian Zhao
require() does what you want. Run ?require for details. require() returns 'FALSE' and gives a warning (rather than an error as 'library()' does by default) if the package does not exist. 'require' returns (invisibly) a logical indicating whether the required package is available. (You can

Re: [R] checking if a package is installed

2010-08-27 Thread Prof Brian Ripley
On Thu, 26 Aug 2010, Jorge Ivan Velez wrote: Hi pdb, Take a look at http://r.789695.n4.nabble.com/test-if-a-package-is-installed-td1750671.html#a1750674 You are citing yourself with a poor solution (calling installed.packages()) -- so please don't. The help page for installed.packages in

Re: [R] R and MySQL

2010-08-27 Thread Dejian Zhao
I am not sure whether you are working under windows. Hope the following message helps. Using the RMySQL package under Windows http://www.stat.berkeley.edu/users/spector/s133/RMySQL_windows.html On 2010-8-27 5:03, quant wrote: I installed MySQL 5.0.67 and R. I installed RMySQL and added env

[R] Nestad ANOVA with random Factors

2010-08-27 Thread Pablo R
Hi, I need a help. I am new in R and I need to run a nested anova with fixed and random factors (Mixed Model). I have a design with three factors: Day, Area and Plot and the dependent variable is density. The factors Day and Area are fixed while Plot is random, factor Area is nested in factor

[R] Remove Loading required package message

2010-08-27 Thread Sébastien Moretti
Hi I use --vanilla --quiet --slave options on command line but I always get Loading required package: ... in stderr. How to remove this line ? Thanks R 2.5.1 -- Sébastien Moretti SIB Vital-IT EMBnet, Quartier Sorge - Genopode CH-1015 Lausanne, Switzerland Tel.: +41 (21) 692 4079/4221

Re: [R] Again: wget parameters

2010-08-27 Thread Gavin Simpson
Look at the RCurl package. I've used this to automate donwloading files from a web server with this sort of authentication: I have this is in a file I used earlier in the year: require(RCurl) URL -

Re: [R] About plot graphs

2010-08-27 Thread Gavin Simpson
On Thu, 2010-08-26 at 21:01 -0700, Stephen Liu wrote: Hi Greg, snip / windows(width=12, height=6) Error: could not find function windows So you aren't on Windows then... Hence why the posting guide asks for sessionInfo() details; sometimes it matters. Anyway, a OS independent way of doing

Re: [R] Using termplot() with transformations of x

2010-08-27 Thread Niels Richard Hansen
On 27/08/10 01.10, Peter Dunn wrote: Hi all I was playing with termplot(), and came across what appears to be an inconsistency. It would appreciate if someone could enlighten me: # First, generate some data: y- rnorm(100) x- runif(length(y),1,2) # Now find the log of x: logx- log(x) #

[R] R-help

2010-08-27 Thread venkatesh bandaru
Respected R Help Team Members, I am venkatesh .B , doing mtech in *University of Hyd,HYDERABAD. *i want know , is there any package that contains Hungarian algorithm, that solves linear assignment problem. thanking you. * * -- *Sincerely B.venkatesh University of Hyd,HYDERABAD

Re: [R] About plot graphs

2010-08-27 Thread Stephen Liu
Hi Gavin, Thanks for your advice which works for me. (rectangular window) dev.new(height = 6, width = 12) layout(matrix(1:2, nrow=1)) plot(Test01$Day_of_year, Test01$Draft_No.) attach(Test01) plot(Day_of_year,Draft_No.) (rectangular window in vertical position) dev.new(height = 12, width = 4)

Re: [R] Remove Loading required package message

2010-08-27 Thread Barry Rowlingson
On Fri, Aug 27, 2010 at 9:09 AM, Sébastien Moretti sebastien.more...@unil.ch wrote: Hi I use --vanilla --quiet --slave options on command line but I always get    Loading required package: ... in stderr. How to remove this line ? Thanks require it quietly: require(sp,quietly=TRUE)

Re: [R] R-help

2010-08-27 Thread Girish A.R.
Venkatesh, Check out the package lpSolve. It has the function lp.assign() that can be used to solve linear assignment problems. cheers, -Girish -- View this message in context: http://r.789695.n4.nabble.com/R-help-tp2340772p2340818.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] About plot graphs

2010-08-27 Thread Gavin Simpson
On Fri, 2010-08-27 at 02:05 -0700, Stephen Liu wrote: Hi Gavin, Thanks for your advice which works for me. (rectangular window) dev.new(height = 6, width = 12) layout(matrix(1:2, nrow=1)) plot(Test01$Day_of_year, Test01$Draft_No.) attach(Test01) plot(Day_of_year,Draft_No.) 1) I

Re: [R] Again: wget parameters

2010-08-27 Thread [Ricardo Rodriguez] Your XEN ICT Team
Thanks Gavin. Gavin Simpson wrote: Unfortunately, binaries are not available on CRAN for MacOS X and Windows, though Prof. Brian Ripley provides a binary for the later - see the link on the RCurl page on CRAN: Installation of the source worked like charm by using R package installer after

Re: [R] Remove Loading required package message

2010-08-27 Thread Sébastien Moretti
I have also found this, hidden in the mailing list: suppressPackageStartupMessages(library('...')) It does what I expect. Thanks Hi I use --vanilla --quiet --slave options on command line but I always get Loading required package: ... in stderr. How to remove this line ? Thanks

[R] predict.loess and NA/NaN values

2010-08-27 Thread Philipp Pagel
Hi! In a current project, I am fitting loess models to subsets of data in order to use the loess predicitons for normalization (similar to what is done in many microarray analyses). While working on this I ran into a problem when I tried to predict from the loess models and the data

Re: [R] Again: wget parameters

2010-08-27 Thread Gavin Simpson
On Fri, 2010-08-27 at 11:43 +0200, [Ricardo Rodriguez] Your XEN ICT Team wrote: Thanks Gavin. Gavin Simpson wrote: Unfortunately, binaries are not available on CRAN for MacOS X and Windows, though Prof. Brian Ripley provides a binary for the later - see the link on the RCurl page on

Re: [R] non-linear plot parameters

2010-08-27 Thread Peter Ehlers
On 2010-08-26 15:52, Marlin Keith Cox wrote: I agree. I typically do not use non-linear functions, so am seeing the art in describing functions of non-linear plots. One last thing. I tried to use a self-starting Weibull function with the posted data and received the following error.

[R] export 4D data as povray density files

2010-08-27 Thread baptiste auguie
Dear list, I wish to visualise some 4D data as a kind of colour / translucent cloud in 3D. I haven't seen such plots in R (but perhaps I missed a feature of rgl). The easiest option I found would be to export the data in povray's df3 (density file) format and visualise it with povray. The format

Re: [R] Again: wget parameters

2010-08-27 Thread [Ricardo Rodriguez] Your XEN ICT Team
Thanks again, Gavin. Gavin Simpson wrote: On Fri, 2010-08-27 at 11:43 +0200, [Ricardo Rodriguez] Your XEN ICT Team wrote: Thanks Gavin. Gavin Simpson wrote: Unfortunately, binaries are not available on CRAN for MacOS X and Windows, though Prof. Brian Ripley provides a binary for the later -

Re: [R] export 4D data as povray density files

2010-08-27 Thread Deepayan Sarkar
On Fri, Aug 27, 2010 at 3:41 PM, baptiste auguie baptiste.aug...@googlemail.com wrote: Dear list, I wish to visualise some 4D data as a kind of colour / translucent cloud in 3D. I haven't seen such plots in R (but perhaps I missed a feature of rgl). The easiest option I found would be to

Re: [R] Again: wget parameters

2010-08-27 Thread Gavin Simpson
On Fri, 2010-08-27 at 12:22 +0200, [Ricardo Rodriguez] Your XEN ICT Team wrote: Thanks again, Gavin. Gavin Simpson wrote: On Fri, 2010-08-27 at 11:43 +0200, [Ricardo Rodriguez] Your XEN ICT Team wrote: Thanks Gavin. Gavin Simpson wrote: Unfortunately, binaries are not available

Re: [R] LSAP and the Hungarian algorithm [was: R-help]

2010-08-27 Thread Hans W Borchers
venkatesh bandaru venkatesh.bandaru at gmail.com writes: If you had searched for it, you would have easily found the 'clue' package: In package clue solve_LSAP() enables the user to solve the linear sum assignment problem (LSAP) using an efficient C implementation of the Hungarian

Re: [R] export 4D data as povray density files

2010-08-27 Thread Jim Lemon
On 08/27/2010 08:11 PM, baptiste auguie wrote: Dear list, I wish to visualise some 4D data as a kind of colour / translucent cloud in 3D. I haven't seen such plots in R (but perhaps I missed a feature of rgl). The easiest option I found would be to export the data in povray's df3 (density file)

Re: [R] Again: wget parameters

2010-08-27 Thread [Ricardo Rodriguez] Your XEN ICT Team
OK! Gavin Simpson wrote: Sorry, I meant: install.packages(RCurl, type = source) G Here the output. Now, it seems to install without a glitch. I'm afraid I won't learn this time the origin of that message! http://xen.net/txt/installSourceRCurl20100827.txt Thanks for your help,

Re: [R] Again: wget parameters

2010-08-27 Thread Gavin Simpson
On Fri, 2010-08-27 at 13:11 +0200, [Ricardo Rodriguez] Your XEN ICT Team wrote: OK! Gavin Simpson wrote: Sorry, I meant: install.packages(RCurl, type = source) G Here the output. Now, it seems to install without a glitch. I'm afraid I won't learn this time the origin

Re: [R] Problems when Apply a script to a list

2010-08-27 Thread Joris Meys
Where exactly did you put the sink() statement? I tried it with a 1000 dataframes and I have no problem whatsoever. Cheers Joris On Fri, Aug 27, 2010 at 6:56 AM, ev...@aueb.gr wrote: Joris, thank you very much for your help. It is very helpful for me. I still have a problem with sink stack

[R] R.matlab package help

2010-08-27 Thread michael
Hi,all I have a problem running R.matlab package (under 2.10.1 version). I can set up the matlab server under local machine(run the MatlabServer.m), And I can use setVariable and evaluate matlab functions in R. But when I ask Matlab to send the value back to R using

[R] calculate the elasticities by linear.hypothesi commander

2010-08-27 Thread Jinghua Xie
Dear all If I run the model and get the estimated parameter a11. Then I want to use the estimated parameter to calculate the elasticities by using the formula e11=a11/mw1-1. What I have done is using the command of linear. Hypothesis.

Re: [R] R.matlab package help

2010-08-27 Thread michael
David, Thanks for your reply, I compile it under the old version of R, I'll update R and run it again. Michael On Fri, Aug 27, 2010 at 7:59 AM, michael tufemich...@gmail.com wrote: Hi,all                      I have a problem running R.matlab package (under 2.10.1 version). I can

[R] Sorting groups in bwplot chart

2010-08-27 Thread Jan Hornych
Hi all, I am just curious how to sort the groups in a categorical box plot chart bwplot here is the example: d-data.frame(sample(rep(month.abb,20), 100), runif(100,1,10)); colnames(d) - c(Month, Value); bwplot(d$Month ~ d$Value); as you can see Months are not sorted alphabetically. Does

Re: [R] LFA package

2010-08-27 Thread Ingmar Visser
The sem package may be what you are looking for, hth, Ingmar On Thu, Aug 26, 2010 at 9:24 PM, David Joubert jo...@hotmail.com wrote: Hello all- Just wondering if anyone has heard of a package performing latent factor analysis, similar to what is done with LatentGold. I know that PoLCA does

[R] Odp: Sorting groups in bwplot chart

2010-08-27 Thread Petr PIKAL
Hi make Month factor, sort its levels and do bwplot as you did ?factor ?levels Regards Petr r-help-boun...@r-project.org napsal dne 27.08.2010 15:03:06: Hi all, I am just curious how to sort the groups in a categorical box plot chart bwplot here is the example:

[R] plot data by class tag

2010-08-27 Thread arvin mer
Hello to all,I have a data file as Class V1V2A -2.00.0A 0.90.7B 0.10.6C 4.1 0.4C 1.01.9B 1.10.5 I am plotting this data in R as V1 verses V2 temp-read.table('temp.dat', header=T) attach(temp) plot (V1,V2, col='red') text(x=V1, y=V2,

Re: [R] Sorting groups in bwplot chart

2010-08-27 Thread peter dalgaard
On Aug 27, 2010, at 3:03 PM, Jan Hornych wrote: Hi all, I am just curious how to sort the groups in a categorical box plot chart bwplot here is the example: d-data.frame(sample(rep(month.abb,20), 100), runif(100,1,10)); colnames(d) - c(Month, Value); bwplot(d$Month ~ d$Value); as

Re: [R] calculate the elasticities by linear.hypothesi commander

2010-08-27 Thread John Fox
Dear Jinghua Xie, This is, I assume, the linear.hypothesis function in the car package, which is deprecated in favour of linearHypothesis. Please see below: -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Jinghua Xie Sent:

Re: [R] Sorting groups in bwplot chart

2010-08-27 Thread David Winsemius
On Aug 27, 2010, at 9:03 AM, Jan Hornych wrote: Hi all, I am just curious how to sort the groups in a categorical box plot chart bwplot here is the example: d-data.frame(sample(rep(month.abb,20), 100), runif(100,1,10)); colnames(d) - c(Month, Value); bwplot(d$Month ~ d$Value); as you

Re: [R] sqldf syntax

2010-08-27 Thread Bond, Stephen
I had checked those references before posting, actually. SQLite has a very limited implementation of the standard. To do a single table update I would not go to sql. It's easy enough to do in R. The problem is when I need to do an update from a left outer join, which I had to do with sqlSave

Re: [R] export 4D data as povray density files

2010-08-27 Thread baptiste Auguié
Thanks – figure 3 is actually pretty close to what I had in mind. I had forgotten about this package. I still hope to work out the povray route as the end result look really good (and that's probably the main point of such graphics). Best, baptiste On Aug 27, 2010, at 12:37 PM, Deepayan

Re: [R] plot data by class tag

2010-08-27 Thread David Winsemius
On Aug 27, 2010, at 9:09 AM, arvin mer wrote: Hello to all,I have a data file as This came to the list mangled because of your failure to follow Posting Guide advice to use plain text. POST IN PLAIN TEXT. dput(temp) structure(list(Class = structure(c(1L, 1L, 2L, 3L, 3L, 2L), .Label =

[R] Band-wise Sum

2010-08-27 Thread Vincy Pyne
Hi I have a large credit portfolio (exceeding 5 borrowers). For particular process I need to add up the exposures based on the bands. I am giving a small test data below. rating - c(A, AAA, A, BBB,AA,A,BB, BBB, AA, AA, AA, A, A, AA,BB,BBB,AA, A, AAA,BBB,BBB, BB, A, BB, A, AA, B,A, AA,

Re: [R] plot data by class tag

2010-08-27 Thread Joshua Wiley
Hi, This should do it. I let plot() choose whatever colors it wanted, but if you really wanted you could set them manually. Many thanks to David for the data. plot(temp$V1, temp$V2, pch = as.character(temp$Class), col = temp$Class) # As an alternative using ggplot2 # I do not use A, B, C,

Re: [R] Nestad ANOVA with random Factors

2010-08-27 Thread Dennis Murphy
Hi: I'm kind of wondering why Area and Plot are nested within Day. Are you measuring different areas and different plots on different days? Dennis On Fri, Aug 27, 2010 at 12:43 AM, Pablo R ri...@hotmail.com wrote: Hi, I need a help. I am new in R and I need to run a nested anova with

Re: [R] R-help

2010-08-27 Thread Ravi Varadhan
However, The clue package has the solve_LSAP() function (as pointed out by Hans Werner) that solves the linear sum assignment problem, but it uses the Hungarian algorithm that was requested by you. The lp.assign() function in lpSolve package (as pointed out by Girish) also solves the linear sum

Re: [R] Band-wise Sum

2010-08-27 Thread David Winsemius
On Aug 27, 2010, at 9:49 AM, Vincy Pyne wrote: Hi I have a large credit portfolio (exceeding 5 borrowers). For particular process I need to add up the exposures based on the bands. I am giving a small test data below. I would think that cut() would be the accepted method for

[R] multivariate distributions

2010-08-27 Thread Rofizah Mohammad
Hi, How can I generate data from multivariate gamma distribution multivariate beta distribution? I only found command for multivariate normal only. Many thanks in advance :) Regards Rofizah [[alternative HTML version deleted]] __

[R] AIC using nls function

2010-08-27 Thread John Ludlam
Using the nls function I fit the following model (and some others) to my data. mod1=nls(CLr ~ A-(A-CLi)*exp(-k*d), start = list(A=60,k=0.005)) I would like to rank a set of models using AIC. I calculated AIC as AIC(mod1) However, it appears to use an incorrect number of parameters (3 instead of

Re: [R] LFA package

2010-08-27 Thread Dennis Murphy
Hi: To find functions in R for particular tasks, package sos is an invaluable resource: library(sos) findFn('latent factor analysis') produces 72 hits on my system, not all of which are relevant, but at least it gets you in the vicinity of what you're looking for. In addition to sem, it

Re: [R] multivariate distributions

2010-08-27 Thread David Winsemius
On Aug 27, 2010, at 10:42 AM, Rofizah Mohammad wrote: Hi, How can I generate data from multivariate gamma distribution multivariate beta distribution? I only found command for multivariate normal only. You need to improve your searching skills: rhelpSearch function(string,

[R] How to maintain class signature in splom

2010-08-27 Thread Gosink, John
All, I was having trouble trying to create a new class of data and pass it on to splom (in the lattice library). I mentioned this to Martin Morgan after a talk he gave. Following is not so much a question, but rather an answer from Morgan that might be useful to others. Here is the

[R] Error: package/namespace load failed for 'IlluminaHumanMethylation27k.db'

2010-08-27 Thread Kristel van Eijk
Hello everyone, I have a problem when loading the library: IlluminaHumanMethylation27k.db I installed the package from zip (from the Bioconductor website), and also installed all the packages it asked for. It went all succesfull: package 'IlluminaHumanMethylation27k.db' successfully unpacked

Re: [R] AIC using nls function

2010-08-27 Thread Bert Gunter
John: 1. As always, and as requested (see posting guide), a small reproducible example might help. 2. What is CLi in your model? 3. In general, AIC may not be particularly meaningful as a measure of fit quality penalized for model complexity in NON-linear models unless the different models are

[R] Grouping sets of data, performing function and re-assigning values

2010-08-27 Thread Johnny Tkach
Hi there, I hope you have time to read this question and offer a suggestion or two. My basic question is this: I have data in sets of three. I would like to combine the data from each set, perform a function (probably just taking the median and MAD), then re-assign these values to each of

[R] step

2010-08-27 Thread Silvano
Hi, how can I change the significance level in test F to select variable in step command? I used step(model0, ~x1+x2+x3+x4, direction=c(forward), test='F', alpha=.05) but it does't work. -- Silvano Cesar da Costa Departamento de Estatística

Re: [R] Error: package/namespace load failed for 'IlluminaHumanMethylation27k.db'

2010-08-27 Thread Martin Morgan
Hi Kristel -- On 08/27/2010 05:48 AM, Kristel van Eijk wrote: Hello everyone, I have a problem when loading the library: IlluminaHumanMethylation27k.db I installed the package from zip (from the Bioconductor website), and also installed all the packages it asked for. It went all

Re: [R] R.matlab package help

2010-08-27 Thread michael
Henrik, Thanks for your reply. I am using Matlab version 7.9.0(R2009b). This is my first try using R.matlab. I started matlab in the same machine, and I run the MatlabServer.m in matlab, here is my code in R: library(R.matlab) library(MASS) matlab - Matlab() open(matlab)

[R] [R-pkgs] TraMineR version 1.6-1

2010-08-27 Thread Alexis Gabadinho
Dear R users, The TraMineR package for mining, describing and visualizing sequences of states or events, and more generally discrete sequential data has been updated to version 1.6-1. Its primary aim is the analysis of biographical longitudinal data in the social sciences, such as data

[R] [R-pkgs] New package: mpt

2010-08-27 Thread florian . wickelmaier
Dear all, I have submitted a new package called mpt to CRAN. It contains functions for fitting and testing multinomial processing tree (MPT) models, a class of statistical models for categorical data that involve latent parameters. These parameters are often interpreted as psychological

[R] OT: Re: Fwd: R SOFTWARE

2010-08-27 Thread Allan Engelhardt
On 18/08/10 10:46, Nokuzola Simakuhle wrote: NB: This email and its contents are subject to the Eskom Holdings Limited EMAIL LEGAL NOTICE which can be viewed at http://www.eskom.co.za/email_legalnotice Since your email policy allows for no copying or distribution of your message, you

[R] pairwise correlations for large dataset

2010-08-27 Thread Alayne L. Brunner
Hello, I need to calculate the correlation for all pairwise combinations in a very large matrix. I have 25,000 elements and need to calculate the pairwise correlation with a different set of 5,000 elements. I have written code that works, but it is extremely slow. At the current rate, it

[R] How to calc ratios base on current and previous row?

2010-08-27 Thread Marcus Drescher
Hi all, I want to calculate in each row a ratio based on number in the current row and the previous row. Is there a way to do this without for-loops because that is extremely slow. A B [1] 2 2 [2] 2 3 [3] 4 5,5 ... B2 = A2 +

Re: [R] multivariate distributions

2010-08-27 Thread Dennis Murphy
Hi: One form of a multivariate beta distribution is the Dirichlet, so using package sos, library(sos) # install if necessary u - findFn('Dirichlet distribution') grepFn('Dirichlet distribution', u, column = 'Description', ignore.case = TRUE) reveals about 25 matches, about half of which

Re: [R] How to calc ratios base on current and previous row?

2010-08-27 Thread Bert Gunter
Your question is unclear. If the calculation of B[3] now depends on the newly calculated value of B[2], then the answer is no: you must loop. If B[3] is based on the original B[2] value, then the answer is yes, and the solution is just a matter of simple indexing, which I leave as an exercise. --

Re: [R] Grouping sets of data, performing function and re-assigning values

2010-08-27 Thread Johnny Tkach
Hi all, Since I could not attach a file to my original e-mail request, for those who want to look at an example of a data file I am working with, please use this link: http://dl.dropbox.com/u/4637975/exampledata.csv Thanks again, Johnny. __

Re: [R] How to calc ratios base on current and previous row?

2010-08-27 Thread Ted Harding
On 27-Aug-10 17:17:50, Marcus Drescher wrote: Hi all, I want to calculate in each row a ratio based on number in the current row and the previous row. Is there a way to do this without for-loops because that is extremely slow. A B [1] 2 2 [2] 2 3

Re: [R] pairwise correlations for large dataset

2010-08-27 Thread Alayne L. Brunner
Actually, I've answered my own question. It turns out that transposing the expression matrix first, outside of the loop, significantly improves the speed. It now looks like the entire matrix should be calculated in a day or two. So I think this solution should be fine. I now have this:

Re: [R] R.matlab package help

2010-08-27 Thread Henrik Bengtsson
Hi, what is the version of Matlab you are running? Could you show a minimum verbatim example - starting with a fresh R session and library(R.matlab) - that gives you the error? Have you tried the example of help(Matlab)? Then, for troubleshooting it could be useful to ask Matlab to display

Re: [R] Grouping sets of data, performing function and re-assigning values

2010-08-27 Thread Ista Zahn
Hi Johnny, If I understand correctly, I think you can use cut() to create a grouping variable, and then calculate your summaries based on that. Something like dat - read.csv(~/Downloads/exampledata.csv) dat$image.group - cut(dat$a.ImageNumber, breaks = seq(0, max(dat$a.ImageNumber), by = 3))

Re: [R] Importance of levels in a factor variable

2010-08-27 Thread Saeed Abu Nimeh
Thanks Greg. Actually, we have 5000 levels and it is not an import problem. I looked into combine.levels in the Hmisc package. The problem with this approach is that it takes the frequency of levels, then combines infrequent levels into one level called Others. If you apply this to the complete

[R] How to plot an expression-label with variable text

2010-08-27 Thread Dieter Menne
Disclaimer: I have read plotmath, but maybe it's too late today: How do I get the two labels to be the same: plot.new() lab =expression(paste(Estimated , t[50], from tgv)) text(0.5,0.5,lab) # Should look the same as above. I could not get the substitute right: what = tgv lab

Re: [R] How to obtain seed after generating random number?

2010-08-27 Thread Paul Gilbert
It is nearly impossible to go back after the fact and figure out the seed you started with. So, you need to be careful to record the seed first. If you are doing your simulations with a function then it is a good idea to always start in the function by saving a record of the seed and returning it

Re: [R] step

2010-08-27 Thread Gavin Simpson
On Fri, 2010-08-27 at 11:03 -0300, Silvano wrote: Hi, how can I change the significance level in test F to select variable in step command? I used step(model0, ~x1+x2+x3+x4, direction=c(forward), test='F', alpha=.05) but it does't work. Well, there is no 'test' argument, nor

Re: [R] How to plot an expression-label with variable text

2010-08-27 Thread baptiste auguie
hi, try this lab =bquote(paste(Estimated , t[50], from ,.(what))) HTH, baptiste On 27 August 2010 20:19, Dieter Menne dieter.me...@menne-biomed.de wrote: plot.new() lab =expression(paste(Estimated , t[50], from tgv)) text(0.5,0.5,lab) # Should look the same as above. I could not get the

Re: [R] Nestad ANOVA with random Factors

2010-08-27 Thread Pablo R
Dear Dennis, I sampled five different plots inside six predetermined areas in three diferent days. Am I doing the analysis right? Thanks, Pablo -- View this message in context: http://r.789695.n4.nabble.com/Nestad-ANOVA-with-random-Factors-tp2340725p2341484.html Sent from the R help

Re: [R] How to plot an expression-label with variable text

2010-08-27 Thread David Winsemius
On Aug 27, 2010, at 2:19 PM, Dieter Menne wrote: Disclaimer: I have read plotmath, but maybe it's too late today: How do I get the two labels to be the same: plot.new() lab =expression(paste(Estimated , t[50], from tgv)) text(0.5,0.5,lab) # Should look the same as above. I could not get the

Re: [R] How to plot an expression-label with variable text

2010-08-27 Thread Dieter Menne
Thanks to both of you. I noted that my example was over-simplified. Looks like I need to correct the environment when nested in a function, but I have to catch the last bus now. Dieter plotExp = function(what) { plot.new() lab =expression(paste(Estimated , t[50], from tgv))

Re: [R] Parsing a XML file

2010-08-27 Thread Orvalho Augusto
Ok. Pardon me. Its is not a bug. My XML is malformed. The program that generates writes things like: agecat5yr/agecat Which make the XML unsable. Sorry everyone Caveman On Wed, Aug 25, 2010 at 5:31 AM, Duncan Temple Lang dun...@wald.ucdavis.edu wrote: xmlDoc() is not the function to use

Re: [R] How to plot an expression-label with variable text

2010-08-27 Thread David Winsemius
On Aug 27, 2010, at 2:28 PM, baptiste auguie wrote: hi, try this lab =bquote(paste(Estimated , t[50], from ,.(what))) bquote doesn't need the paste() if you use plotmath separators: lab =bquote(Estimated ~t[50]~from~.(what)) text(0.5,0.2,lab) HTH, baptiste On 27 August 2010 20:19,

Re: [R] non-linear plot parameters

2010-08-27 Thread Peter Ehlers
Just a small fix to my solution; inserted below. On 2010-08-27 3:51, Peter Ehlers wrote: On 2010-08-26 15:52, Marlin Keith Cox wrote: I agree. I typically do not use non-linear functions, so am seeing the art in describing functions of non-linear plots. One last thing. I tried to use a

Re: [R] R.matlab package help

2010-08-27 Thread Henrik Bengtsson
Hi, could you send me what Matlab is outputting. When I send the following from R: evaluate(matlab, A=2;); Sending expression on the Matlab server to be evaluated...: 'A=2;' and Matlab should print something like: Received cmd: 1 eval string: A=2; Received an 'OK' reply (0) from the Matlab

Re: [R] How to calc ratios base on current and previous row?

2010-08-27 Thread Joshua Wiley
Hi Marcus, I am guessing you are thinking in terms of Excel, where in column B, you could enter the formula =(A2 + 0.5*B1) and just drag it down however many cells you wanted. In R, it would be expressed a bit differently. If k indexes your rows, I believe you want: B[k] = A[k] + 0.5 * B[k -

Re: [R] Grouping sets of data, performing function and re-assigning values

2010-08-27 Thread Johnny Tkach
HI Ista, Thanks for the help. The 'cut' function seems to do the trick . I'm not sure why you suggested this line of code: ddply(dat, .(image.group), transform, measure.median = median(Measurement)) I think I might have confused the issue by putting a 'Measurement' column in my example in

Re: [R] R.matlab package help

2010-08-27 Thread michael
Henrik, Here is the matlab response: MatlabServer Matlab v7.x or higher detected. Saving with option -V6. Added InputStreamByteWrapper to dynamic Java CLASSPATH. -- Matlab server started! -- Trying to open server socket (port )...done. so I

[R] interpreting date-related error message

2010-08-27 Thread Toby Gass
Hello, helpeRs, I have a vector of numbers from 1-365 (days of the year) that I would like to convert to a date. There are no NA's and no missing values. I did not insert leading zero's for numbers less than 100. Using the syntax: dat$doy.1 - as.numeric(format(dat$doy, %j )) I get the

Re: [R] interpreting date-related error message

2010-08-27 Thread Erik Iverson
Toby, What is it that you're trying to accomplish? There seems to be several ideas confused in your post. It sounds like you have input x - 1:365 and you want to call some function to return dates? Which date should be returned for input 1? January 1, 2010? Your error is because if you

Re: [R] interpreting date-related error message

2010-08-27 Thread David Winsemius
On Aug 27, 2010, at 3:29 PM, Toby Gass wrote: Hello, helpeRs, I have a vector of numbers from 1-365 (days of the year) that I would like to convert to a date. There are no NA's and no missing values. I did not insert leading zero's for numbers less than 100. Using the syntax: dat$doy.1 -

Re: [R] interpreting date-related error message

2010-08-27 Thread Phil Spector
Toby - Since dat$doy is just a number, the default S3 method for format is used, where the second argument is the trim parameter. I suspect you are confusing format (which is for output) with strptime (which is for input). For example, strptime(dat$doy,'%j') will assume that the dates

Re: [R] How to calc ratios base on current and previous row?

2010-08-27 Thread Greg Snow
For this particular case there is a nice shortcut (there is still looping , but it is internal and quick): a - c(2,2,4, sample(1:10, 97, TRUE) ) b - cumsum( (1/2)^(99:0)*a )/( (1/2)^(99:0) ) ## compare bb - numeric(100) bb[1] - a[1] for( i in 2:100 ) { bb[i] - 1/2 * bb[i-1] + a[i] }

Re: [R] Grouping sets of data, performing function and re-assigning values

2010-08-27 Thread Joshua Wiley
Hi Johnny, Something like this rbind(NA, dat.med)[as.numeric(dat$image.group), ] should do the trick (with the data you provided and Ista's code). The key is that dat.med has a different row for each level of the factor image.group (and in the same order). The idea is to convert the factor

Re: [R] How to plot an expression-label with variable text

2010-08-27 Thread David Winsemius
On Aug 27, 2010, at 2:51 PM, Dieter Menne wrote: Thanks to both of you. I noted that my example was over-simplified. Looks like I need to correct the environment when nested in a function, but I have to catch the last bus now. Dieter plotExp = function(what) { plot.new() lab

[R] how to use glm for a time course data set

2010-08-27 Thread Jin, Jp
Dear list, I used glm to analyze the effect of treatment, measurement-methods etc. on lesion size in a time course experiments. Could anyone points me out how to extract detailed comparisons of interest? For example: Measurement.T2.M6 vs. Measurement.T2.Baseline, Or even

[R] Scatterplot question

2010-08-27 Thread ashz
Hi, I have two XY datasets (e.g., longitude and concentrations) who share the same X scale. How can I make a simple scatterplot which will combine them both with different colors for the two Y groups? (plot and xyplot solutions are fine with me). Thanks in advance. Cheers -- View this

[R] make.rm

2010-08-27 Thread Bruce Johnson
Where do I find this function? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide

Re: [R] 05 - Re: R and MySQL

2010-08-27 Thread quant
Hello De-Jian Thanks. That helped. It works now. On Fri, Aug 27, 2010 at 2:30 AM, De-Jian,ZHAO [via R] ml-node+2340662-1760624908-138...@n4.nabble.comml-node%2b2340662-1760624908-138...@n4.nabble.com wrote: Waitlist reason:

Re: [R] interpreting date-related error message

2010-08-27 Thread Toby Gass
Thanks to everyone for the explanations. Toby On 27 Aug 2010 at 12:46, Phil Spector wrote: Toby - Since dat$doy is just a number, the default S3 method for format is used, where the second argument is the trim parameter. I suspect you are confusing format (which is for output) with

Re: [R] Scatterplot question

2010-08-27 Thread David Winsemius
On Aug 27, 2010, at 2:16 PM, ashz wrote: Hi, I have two XY datasets (e.g., longitude and concentrations) who share the same X scale. How can I make a simple scatterplot which will combine them both with different colors for the two Y groups? (plot and xyplot solutions are fine with

Re: [R] make.rm

2010-08-27 Thread Peter Dalgaard
On 08/27/2010 08:38 PM, Bruce Johnson wrote: Where do I find this function? On Google, first hit... Now really, If you can't find it, how would you expect anyone else to, without any indication of what the function is supposed to do nor from where you got the idea to look for it? -- Peter

Re: [R] make.rm

2010-08-27 Thread David Winsemius
On Aug 27, 2010, at 2:38 PM, Bruce Johnson wrote: Where do I find this function? Search? (How else?) rhelpSearch - function(string, restrict = c(Rhelp10, Rhelp08, Rhelp02, functions ), matchesPerPage = 100, ...) { RSiteSearch(string=string, restrict = restrict,

Re: [R] LSAP and the Hungarian algorithm [was: R-help]

2010-08-27 Thread Hans W Borchers
Ravi Varadhan rvaradhan at jhmi.edu writes: However, The clue package has the solve_LSAP() function (as pointed out by Hans Werner) that solves the linear sum assignment problem, but it uses the Hungarian algorithm that was requested by you. The lp.assign() function in lpSolve package (as

  1   2   >