Re: [R] test if a package is installed

2010-04-03 Thread Vincent Davis
> > @Jorge # defining a function is.installed <- function(mypkg) is.element(mypkg, installed.packages()[,1]) Thanks for that *Vincent Davis 720-301-3003 * vinc...@vincentdavis.net my blog | LinkedIn On Sat, Apr 3, 2010 at 10

Re: [R] test if a package is installed

2010-04-03 Thread Jorge Ivan Velez
Hi Vincent, Perhaps the following might work: # defining a function is.installed <- function(mypkg) is.element(mypkg, installed.packages()[,1]) R> is.installed('MASS') [1] TRUE R> is.installed('base') [1] TRUE R> is.installed('ROCR') [1] FALSE HTH, Jorge On Sun, Apr 4, 2010 at 12:40 AM, Vin

Re: [R] Export bug? Hist() vs. barchart().

2010-04-03 Thread Jeff Brown
You were right. Jorge Velez wrote me off-list and pointed out that I need to call print() to write the barplot to the device, just as explained in the FAQ. Thanks! -- View this message in context: http://n4.nabble.com/Export-bug-Hist-vs-barchart-tp1750593p1750672.html Sent from the R help mail

[R] test if a package is installed

2010-04-03 Thread Vincent Davis
I am aware of .packages(all.available = TRUE) but I would like to just ask .packages('base') and get TRUE or even better check a list of packages and get a true/false list back. Is there a way to do this? *Vincent Davis 720-301-3003 * vinc...@vincentdavis.net my blog |

Re: [R] Palette color order in bwplot (lattice violin plot) vs. boxplot

2010-04-03 Thread Deepayan Sarkar
On Thu, Apr 1, 2010 at 4:10 AM, Luigi Ponti wrote: > Hello, > > I am trying to give different colors to boxes in a violin plot obtained via > bwplot from lattice package using a color palette from RColorBrewer: > >> require(RColorBrewer) >> MyPalette <- brewer.pal(6, "Set3") > > A call to: > >> bo

Re: [R] Export bug? Hist() vs. barchart().

2010-04-03 Thread David Winsemius
On Apr 3, 2010, at 7:20 PM, Jeff Brown wrote: Hi, If you want to export a single bar chart, this works: png( "ET" ); barchart( data[,"ET"] ) dev.off() quartz_off_screen 2 But if you want to export a few of them, this does not: factorCols <- c("MR","ET"); sapply( factorCols,

[R] Export bug? Hist() vs. barchart().

2010-04-03 Thread Jeff Brown
Hi, If you want to export a single bar chart, this works: > png( "ET" ); > barchart( data[,"ET"] ) > dev.off() quartz_off_screen 2 But if you want to export a few of them, this does not: > factorCols <- c("MR","ET"); > sapply( factorCols, function(x) { + png( x ); +

Re: [R] compare two fingerprint images

2010-04-03 Thread Jim Lemon
On 04/04/2010 05:18 AM, Juan Antonio Gil Pascual wrote: Hi Bernado I need to compare two fingerprint images and let me know if you can do with R. I have used the technique of minutiae but it seems to work better with the cross-correlation and wanted to know if you can do with R. Hi Juan, If yo

Re: [R] compare two fingerprint images

2010-04-03 Thread Tal Galili
How do you nominate a "fortune" ? First run this code: for (i in 1:1000) cat(" Please follow the Posting Guide. ") > > Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.c

Re: [R] compare two fingerprint images

2010-04-03 Thread Barry Rowlingson
On Sat, Apr 3, 2010 at 8:18 PM, Juan Antonio Gil Pascual wrote: > I need to compare two fingerprint images and let me know if you can do with > R. I have used the technique of minutiae but it seems to work better with > the cross-correlation and wanted to know if you can do with R. I don't thin

Re: [R] compare two fingerprint images

2010-04-03 Thread Bernardo Rangel Tura
On Sat, 2010-04-03 at 21:18 +0200, Juan Antonio Gil Pascual wrote: > Hi Bernado > > I need to compare two fingerprint images and let me know if you can do > with R. I have used the technique of minutiae but it seems to work > better with the cross-correlation and wanted to know if you can do wit

Re: [R] histogram-like barplot? (or reverse?)

2010-04-03 Thread Nick Matzke
Nevermind, I think I got it: tempdata = data.frame(cbind(x,y)) xyplot(y ~ x, data=tempdata, xlab=xlabel, ylab=ylabel, xlim=c(1.05* min(timebins), 0), horizontal=FALSE, col="gray", scales=list(alternating=FALSE, tck=c(1,0), x=list(at=timebins, labels=timebins)),

Re: [R] histogram-like barplot? (or reverse?)

2010-04-03 Thread Kjetil Halvorsen
It might work to just say barplot(table(...)) Kjetil CC Or maybe even plot(table(...)) On Sat, Apr 3, 2010 at 5:14 PM, Bob O'Hara wrote: > Hi, Nick! > > plot(.., type="h", lwd=5, lend=3, xaxt="n") > axis(1, at=c(...)) > > is the way to start, after which you play with the code. For yea

Re: [R] tetrachoric correlations

2010-04-03 Thread Kjetil Halvorsen
Did you REALLY try RSiteSearch("tetrachoric") before sending your email? Kjetil On Fri, Apr 2, 2010 at 7:25 PM, HAKAN DEMIRTAS wrote: > Hi, > > Is there any R library/package that calculates tetrachoric correlations from > given marginals and Pearson correlations among ordinal variables? > > I

Re: [R] histogram-like barplot? (or reverse?)

2010-04-03 Thread Bob O'Hara
Hi, Nick! plot(.., type="h", lwd=5, lend=3, xaxt="n") axis(1, at=c(...)) is the way to start, after which you play with the code. For years. Bob On 3 April 2010 21:52, Nick Matzke wrote: > Hi, > > I have a simple task I can't figure out. I'd like to take some > measurements I made, e.g.:

Re: [R] compare two fingerprint images

2010-04-03 Thread Charles C. Berry
On Sat, 3 Apr 2010, Juan Antonio Gil Pascual wrote: Hi Bernado I need to compare two fingerprint images and let me know if you can do with R. I have used the technique of minutiae but it seems to work better with the cross-correlation and wanted to know if you can do with R. First run this

[R] histogram-like barplot? (or reverse?)

2010-04-03 Thread Nick Matzke
Hi, I have a simple task I can't figure out. I'd like to take some measurements I made, e.g.: year (y-axis) 1 2 3 4 5 6 counts (x-axis) 10 10 20 30 40 50 And then, make a barplot with the x-axis ticks (representing the borders between years) between the bars. However, barplot seems to fo

Re: [R] compare two fingerprint images

2010-04-03 Thread Juan Antonio Gil Pascual
Hi Bernado I need to compare two fingerprint images and let me know if you can do with R. I have used the technique of minutiae but it seems to work better with the cross-correlation and wanted to know if you can do with R. Thank you very much Juan Bernardo Rangel Tura escribió: On Fri, 2

Re: [R] Problem installing package

2010-04-03 Thread Uwe Ligges
I know this one is ages old, but I just try to clean up my last two weeks: Maybe you forgot to ask for data(varespec ) after loading the package with library(packagename) Uwe Ligges On 23.03.2010 14:25, David Winsemius wrote: The "inner components" of object are not accessible by name. You

Re: [R] Using ifelse and grep

2010-04-03 Thread Sam Albers
Fantastic. Solved. Thanks! On Sat, Apr 3, 2010 at 9:59 AM, Gabor Grothendieck wrote: > # 1 > grep returns an index, not the value unless you use grep(..., value = > TRUE). > > Easier might be: > > # 2 > Sample2 <- substr(Sample, 1, 2) > ifelse(Sample2 == "BU", "up", ifelse(Sample2 == "BM", "mid

Re: [R] errors in package nortest

2010-04-03 Thread Uwe Ligges
Will try to contact the maintainer on some private way and report back. Uwe Ligges On 29.03.2010 12:11, Robert Offinger wrote: There are two errors in the R package nortest. I tried to contact the maintainer Juergen Gross but to no avail. How should one progress if the mail address is still v

[R] Multilevel model with lme(): Weird degrees of freedom (group level df > # of groups)

2010-04-03 Thread Bertolt Meyer
Hello everyone, I am trying to regress applicants' performance in an assessment center (AC) on their gender (individual level) and the size of the AC (group level) with a multi-level model: model.0 <- lme(performance ~ ACsize + gender, random = ~1 | ACNumber, method = "ML", control = list

Re: [R] Using ifelse and grep

2010-04-03 Thread Gabor Grothendieck
# 1 grep returns an index, not the value unless you use grep(..., value = TRUE). Easier might be: # 2 Sample2 <- substr(Sample, 1, 2) ifelse(Sample2 == "BU", "up", ifelse(Sample2 == "BM", "mid", "down")) or #3 the following which matches the first 2 characters against the given list names and

Re: [R] Using ifelse and grep

2010-04-03 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Sam Albers > Sent: Saturday, April 03, 2010 9:18 AM > To: r-help@r-project.org > Subject: [R] Using ifelse and grep > > Good Morning, > > I am trying to create a new column of c

Re: [R] Writing summary.aov results to a file which can be opened in Excel

2010-04-03 Thread Sam Albers
Julia, I think exporting to excel takes you a step back. Likely it would be easier to work solely in R and sort the P values like that. I had to do something similar only with a bunch of regressions a while back. I found this post extremely helpful as well as the plyr package http://www.r-blogge

Re: [R] RCOM Save

2010-04-03 Thread koj
Sorry. Of course you are right. I am using library(RDCOMClient). I tried the new suggestion which is the solution. Thank you. -- View this message in context: http://n4.nabble.com/RCOM-Save-tp1746602p1749968.html Sent from the R help mailing list archive at Nabble.com. _

[R] Using ifelse and grep

2010-04-03 Thread Sam Albers
Good Morning, I am trying to create a new column of character strings based on the first two letters in a string in another column. I believe that I need to use some combination of ifelse and grep but I am not totally sure how to combine them. I am not totally sure why the command below isn't work

Re: [R] compare two fingerprint images

2010-04-03 Thread Bernardo Rangel Tura
On Fri, 2010-04-02 at 20:52 +0200, Juan Antonio Gil Pascual wrote: > Hello > I wanted to compare two fingerprint images. How do you do with R?. > Is there a role for cross-correlation of images? > > Thanks > Hi juan, You was a quite vage in your question, so I don't know exactly what you need b

Re: [R] Derivative of a smooth function

2010-04-03 Thread Chidambaram Annamalai
While this doesn't answer your question, I want to let you know that there is a proposal for a related improvement within R that will let users compute (numerically) the derivatives, of any order, of a given function inside of R. In your case, this means that you will write the smooth spline functi

Re: [R] Restricting optimisation algorithm's parameter space

2010-04-03 Thread Prof. John C Nash
I have a problem. I am using the NLME library to fit a non-linear model. There is a linear component to the model that has a couple parameter values that can only be positive (the coefficients are embedded in a sqrt). When I try and fit the model to data the search algorithm tries to see if a n

Re: [R] roccomp

2010-04-03 Thread Ravi Kulkarni
Yes, there does not seem to be a method for comparing two ROC curves in ROCR. But I found a discussion in the R-archives which may be useful: http://tolstoy.newcastle.edu.au/R/help/06/03/23667.html You should also see the replies to that post. I am also interested in comparing

Re: [R] mouse-clicking on xy-plot

2010-04-03 Thread Tal Galili
To extend on Walmes "locator", there is a great article (by Timothée) on how to extract data points from an image using R: http://www.r-bloggers.com/getting-data-from-an-image-introductory-post/ Contact Details:--- Contact me:

Re: [R] McDonald's omega calculation. How to???

2010-04-03 Thread Jim Lemon
On 04/03/2010 09:30 AM, sp...@pe.uth.gr wrote: hi people, I am a newbie to R and I would appreciate it very much if someone can help me. I am used to use SPSS so I don’t have experience with writing a script. I have a questionnaire (questions 1-12) and I would like to use the omega reliability. Q

Re: [R] timeseries plot

2010-04-03 Thread vibha patel
Hello, YearERISSRIFTRIDFSRIIFSRITRISRIPSRIERI2 199540.1829.4841.4635.9835.5448.1579.5 11.1526.50120923 199642.9642929.144.0139.3130.4247.5179.78 30.6235.83816143 199744.8585724.4844.92

Re: [R] angles

2010-04-03 Thread Jim Lemon
On 04/03/2010 03:13 AM, Tom_R wrote: Hi R users, I would like to construct a sort hybrid vector/scatter plot. My data is in the following format: 3-column x,y,z data-frame in which every row is a separate data-point. The x& y columns are coordinates, and the z column contains orientation dat