Re: [R] Difference between loops and vectorization

2010-12-01 Thread Dieter Menne
Santosh Srinivas wrote: A fundamental question ...I'm trying to understand the differences between loop and vectorization ... I understand that it should be a natural choice to use apply / adply when it is needed to perform the same function across all rows of a data frame. Any pointers on

Re: [R] Minor warning about seq

2010-12-01 Thread Dieter Menne
Prof. John C Nash wrote: I spent more time than I should have debugging a script because I wanted x-seq(0,100)*0.1 but typed x-seq(O:100)*0.1 seq(0:100) yields 1 to 101, Which leads us to another rule: never use a variable called O. I remember this was a no-no even in my

Re: [R] pca analysis: extract rotated scores?

2010-12-01 Thread Mark Difford
Hi Liviu, However, I'm still confused on how to compute the scores when rotations (such as 'varimax' or other methods in GPArotation) are applied. PCA does an orthogonal rotation of the coordinate system (axes) and further rotation is not usually done (in contrast to factor analysis).

Re: [R] non-linear fourth-order differential equations

2010-12-01 Thread Thomas Petzoldt
Hi Yanika, more information about deSolve (books, papers, tutorials) can be found on the deSolve homepage: http://desolve.r-forge.r-project.org and, of course, in the package documentations. If you need further help from the list, please provide a short reproducible example. Thomas

[R] Reordering entries in package manual PDF's

2010-12-01 Thread Aleksi Kallio
Hello, I have create my own R package and written the documentation in Rd format for each of the functions plus the package itself. However now the functions appear in a random order in the generated PDF and the package documentation is placed in between the functions, when I would like it

[R] Graph in R with edge weights

2010-12-01 Thread arturs . onzuls
Can you please show code example, how to draw graph with some nodes and edges, but with weights. I only found here http://www.bioconductor.org/packages/release/bioc/vignettes/Rgraphviz/inst/doc/Rgraphviz.pdf- Using edge weights for labels, but... Here an example: library(graph);

Re: [R] Error bars in lattice barchart with groups

2010-12-01 Thread Dieter Menne
Henning Wildhagen wrote: i want to plot gene regulation data in a lattice barchart. To illustrate the problem i encounter, the following code uses the barleydataset: #No, i tried to add error bars using the following code: .. As Deepayan noted in #

[R] missing values

2010-12-01 Thread Iasonas Lamprianou
Dear all, i have spent a lot of time trying to solve this problem, but I am sure that there must be a simple solution. So, as a last resort, I am coming back to you again. I have a dataset with some (almost random) values in many variables. Lets say that the dataset represents the scores of

Re: [R] Save R2HTML as an object instead of file

2010-12-01 Thread Joel
Or is there any kind of File buffer that dossent save a file on the harddrive? coz this gives me the thing I want but it still saves the file on the HD .HTML.file=(temp-file(era.html,w+)) HTML(NANALALA) HTML(diag(3)) Then I can just use readLines(temp) to get the result but as I said I

Re: [R] Save R2HTML as an object instead of file

2010-12-01 Thread Gregoire Pau
Hi Joel, The function hwrite() of the package hwriter does that. library(hwriter) hwrite(iris[1:10,]) See examples at http://www.embl.de/~gpau/hwriter/ Cheers, Greg --- Gregoire Pau EMBL Research Officer http://www.embl.de/~gpau/ On 01/12/10 08:53, Joel wrote: Hi Is it possible to

[R] .Internal(download())

2010-12-01 Thread Koray Kaya
Hello, I tried to use GEOQuery package of BioC. It does not download GSE. I investigated problem, understood that the problem was about internal function download. Reccomendations about it mostly suggest switching any proxy off in R. I did, and nothing changed. I use Ubuntu Lucid 64 bit

Re: [R] Problem in reading Excel spreadsheets

2010-12-01 Thread Ivan Calandra
Hi, I don't know much about RODBC, but the package xlsReadWrite works pretty well for me for reading and writing xls files (and it doesn't need Perl or anything else to run). Ivan Le 12/1/2010 08:56, Stephen Liu a écrit : Hi folks, Win 7 64bit R 2.12.0 32bit Problem in reading Excel

Re: [R] How to draw a rect() behind a hist() ?

2010-12-01 Thread Ivan Calandra
Hi, For your second question, take a look at ?clip. The example explains really well what you can do and how. HTH, Ivan Le 12/1/2010 04:42, Peter Ehlers a écrit : On 2010-11-30 17:27, Jason Edgecombe wrote: Hi, I have the following code: hist(gps$heartpercent, breaks=5) rect(90,

Re: [R] Error bars in lattice barchart with groups

2010-12-01 Thread Dieter Menne
This is an interesting discussion on barchart (without error bars) http://www.decisionsciencenews.com/2010/08/11/which-chart-is-better/ Dieter -- View this message in context: http://r.789695.n4.nabble.com/Error-bars-in-lattice-barchart-with-groups-tp3065864p3066860.html Sent from the R

Re: [R] missing values

2010-12-01 Thread Ivan Calandra
Hi, (a) sum() and mean() have a na.rm argument that should be set to TRUE. (b) let's try with an example: x - c(1:5, NA, NA, 6:10, NA) x[is.na(x)] - 0 ## replace NAs by 0 HTH, Ivan Le 12/1/2010 10:00, Iasonas Lamprianou a écrit : Dear all, i have spent a lot of time trying to solve this

Re: [R] Problem in reading Excel spreadsheets

2010-12-01 Thread Stephen Liu
Hi Ivan, Thanks for your advice. I have problem running xlsReadWrite on 64 bit Win7. library(xlsReadWrite) xlsReadWrite version (cran shlib) Copyright (C) 2010 Hans-Peter Suter, Treetron, Switzerland. !! Your installation contains the cran placeholder shlib (dll/so). Please get the regular

Re: [R] missing values

2010-12-01 Thread Michael Bedward
And just to add to Ivan's comment, if you are using the rowSums or colSums functions with a matrix or data.frame they also have the na.rm argument. Michael On 1 December 2010 20:16, Ivan Calandra ivan.calan...@uni-hamburg.de wrote: Hi, (a) sum() and mean() have a na.rm argument that should be

Re: [R] How to draw a rect() behind a hist() ?

2010-12-01 Thread Jim Lemon
On 12/01/2010 12:27 PM, Jason Edgecombe wrote: Hi, I have the following code: hist(gps$heartpercent, breaks=5) rect(90, par(usr)[3], 100, par(usr)[4], col = red) How do I get the rectangle to appear behind the histogram. Barring that, how can I make certain bars of the histogram to be a

[R] how to remove grid lines from coplot graphs

2010-12-01 Thread Seth Roberts
coplot() usually puts grid lines in the panels it makes. To see examples, example(coplot). How can I remove those grid lines? Seth Roberts [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] missing values

2010-12-01 Thread Iasonas Lamprianou
thank you, I'll have a go and let you know if i have problems Dr. Iasonas Lamprianou Assistant Professor (Educational Research and Evaluation) Department of Education Sciences European University-Cyprus P.O. Box 22006 1516 Nicosia Cyprus Tel.: +357-22-713178 Fax: +357-22-590539 Honorary

Re: [R] Save R2HTML as an object instead of file

2010-12-01 Thread Eric Lecoutre
Hi Joel, You can use: obj=diag(3) txt=capture.output(HTML(obj,file=)) Then you may manipulate elements, paste with collapse argument, replace parts with gsub and so on. HTH, Eric 2010/12/1 Joel joda2...@student.uu.se Hi Is it possible to instead of getting the HTML code written to a

[R] .Internal(download())

2010-12-01 Thread Koray Kaya
Hello, I tried to use GEOQuery package of BioC. It does not download GSE. I investigated problem, understood that the problem was about internal function download. Reccomendations about it mostly suggest switching any proxy off in R. I did, and nothing changed. I use Ubuntu Lucid 64 bit Thanks

[R] problems formulating arguments to lme()

2010-12-01 Thread Robert Kinley
this is a clearer (I hope) version of an earlier post - My problem is formulating the random = argument to give estimates of all 9 random components for this kind of setup where there are (I think) 9 variance/covariance components ... Study.1Study.2 ...

Re: [R] Adding text to a multiplot (via mfrow)

2010-12-01 Thread smj_115
Hi Peter Many thanks. I will have a go with that and see if I have any joy. Your advice is much appreciated. Sam -- View this message in context: http://r.789695.n4.nabble.com/Adding-text-to-a-multiplot-via-mfrow-tp3065850p3067003.html Sent from the R help mailing list archive at

Re: [R] Problem in reading Excel spreadsheets

2010-12-01 Thread Ivan Calandra
Hi again, There are also other packages to read and write xls files, including gdata (read), dataframe2xls and writeXLS (write), which depend on Perl or Python if I'm not mistaken. I have no idea whether they work on Windows 64 bits. Visit Crantastic http://crantastic.org/ Ivan Le 12/1/2010

Re: [R] Difficulty loading packages into R version 2.12.0

2010-12-01 Thread Uwe Ligges
Run update.packages(checkBuilt=TRUE) to get package binaries that were compield for your version of R. Uwe Ligges On 24.11.2010 04:24, john moran wrote: Apologies for my previous effort in HTML which apparently was scrubbed Dear R-users I wonder if I could get advice on the above

Re: [R] ggplot2 histograms

2010-12-01 Thread Small Sandy (NHS Greater Glasgow Clyde)
Thanks Thierry Using the position_dodge positioning option ought to work but there is something wrong with the scaling when the binwidth is not = 1. You can begin to see this with the example I sent: If you do ggplot(data=dafr, aes(x = d1, fill=d2)) + geom_histogram(binwidth = 1, position =

[R] mailing list subscription

2010-12-01 Thread dondom
[[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 commented, minimal, self-contained,

Re: [R] Pass an operator to function

2010-12-01 Thread Duncan Murdoch
On 30/11/2010 9:54 PM, randomcz wrote: Hi guys, How to pass an operator to a function. For example, test- function(a, , b) { return(ab) #the operator is passed as an argument } Thanks, It's much simpler than the other suggestions. Just pass the operator, and treat it as a

Re: [R] .Internal(download())

2010-12-01 Thread Duncan Murdoch
On 01/12/2010 5:12 AM, Koray Kaya wrote: Hello, I tried to use GEOQuery package of BioC. It does not download GSE. I investigated problem, understood that the problem was about internal function download. Reccomendations about it mostly suggest switching any proxy off in R. I did, and nothing

[R] Lattice dotplots

2010-12-01 Thread barbara . chaves
Dear, I have a dataset with 4 subjects (see ID in example), and 4 treatment (see TRT in example) which are tested on 2 locations and in 3 blocs. By using Lattice dotplot, I made a graph that shows the raw data per location and per bloc. In that graph, I would like to have a reference line per

Re: [R] reference text variables as column name to plot [SOLVED]

2010-12-01 Thread Graves, Gregory
The following works nicely. Thank you. plot(z, sf[[s]], type=l) #where the dataframe name in my case is sf Sorry - I meant to say there were 24 rows in each column, so z=1:24 Gregory A. Graves, Lead Scientist Everglades REstoration COoordination and VERification (RECOVER) Restoration

Re: [R] Problem in reading Excel spreadsheets

2010-12-01 Thread Gabor Grothendieck
On Wed, Dec 1, 2010 at 2:56 AM, Stephen Liu sati...@yahoo.com wrote: Hi folks, Win 7 64bit R 2.12.0 32bit Problem in reading Excel spreadsheets There are quite a few alternatives for reading Excel spreadsheets. They are listed here:

Re: [R] Where is gdata?

2010-12-01 Thread Gabor Grothendieck
On Sun, Nov 28, 2010 at 6:44 AM, Stephen Liu sati...@yahoo.com wrote: Hi folks, Win 7 64 bit R 32 bit install.packages(gregmisc) Installing package(s) into ‘C:\Users\satimiswin764\Documents/R/win-library/2.12’ (as ‘lib’ is unspecified) --- Please select a CRAN mirror for use in this

Re: [R] Welcome to the R-help mailing list

2010-12-01 Thread Ista Zahn
Hi Bill, Please keep the R list copied. I don't think you've given enough information to pin down your problem. This works: dat - read.table(textConnection(dates returns 2000-1-4 -0.038344718 2000-1-50.00195 2000-1-60.000955702 2000-1-70.027090384 2000-1-100.011189966

Re: [R] pca analysis: extract rotated scores?

2010-12-01 Thread He Zhang
Hi, I am also doing PCA. Is the following right for extracting the scores? library(psych) pca-principal(data,nfactors=,rotate=varimax,scores=T) pca$loadings pca$score Best regards, He On Tue, Nov 30, 2010 at 10:22 AM, Liviu Andronic landronim...@gmail.com wrote: Dear all I'm unable to find

Re: [R] cluster analysis: predefined clusters

2010-12-01 Thread deriK2000
Peter Langfelder wrote: On Fri, Nov 26, 2010 at 6:55 AM, Derik Burgert derik2...@yahoo.de wrote: Dear list, running a hierachical cluster analysis I want to define a number of objects that build a cluster already. In other words: I want to force some of the cases to be in the same

Re: [R] ggplot2 histograms

2010-12-01 Thread Ista Zahn
Hi Sandy, I don't have an answer to your question, but wanted to share another possibility: ggplot(data=dafr, aes(x = d1, fill=d2)) + geom_histogram(binwidth = 1, position = position_identity(), alpha=.5) Best, Ista On Wed, Dec 1, 2010 at 6:09 AM, Small Sandy (NHS Greater Glasgow Clyde)

Re: [R] how to remove grid lines from coplot graphs

2010-12-01 Thread Peter Ehlers
On 2010-12-01 01:51, Seth Roberts wrote: coplot() usually puts grid lines in the panels it makes. To see examples, example(coplot). How can I remove those grid lines? Seth Roberts That's hard-coded in coplot. But you can easily make a modified copy of coplot. Here are the steps: 1. make a

[R] Plot a matrix recursively

2010-12-01 Thread alcesgabbo
Hi, I have the following matrix (named m): key sensor_date Laser_1 Laser_2 Laser_3 2010-09-30T15:00:12+020063 1 2010-10-31T15:05:07+0100

[R] parametric estimators for species richness in R

2010-12-01 Thread yangwenjing
Dear everyone, I am doing some work about species richness estimation. Nonparametric estimation (such as Chao1, Jacknife1) can be done just using function specpool() and estimateR() in package vegan. The problem is that I can not found any functions for parametric estimation (such as MMMeans,

Re: [R] Troubles using postscript(family = ComputerModern)

2010-12-01 Thread Martin Maechler
David Winsemius dwinsem...@comcast.net on Mon, 29 Nov 2010 09:46:08 -0500 writes: On Nov 29, 2010, at 9:00 AM, pilchat wrote: Hi guys, to make it easier, here is a simple case with the same issues. I use the short function below to make the attached PS file.

[R] anova error

2010-12-01 Thread Jean . Coursol
Just for fun This small program gives negative Sum of Sq in anova (with R versions 2.9.2 and 2.10.0) (linux 32 kernel 2.6.29.6-smp slackware 13.0) : y = c(3.6, 5.0, 5.0, 4.6, 4.5, 4.3, 4.5, 5.1, 4.5, 4.3) trans = as.factor(c(NT,NT,NT,NT,NT,T,T,T,T,T)) lc = lm(y ~ trans) l1 = lm(y ~ 1)

[R] Searching for packages for normalizing Metabolomic data

2010-12-01 Thread nqueralt
Hi everybody, I am a beginner in the steps of pre-processing and data analysis of non-targeted metabolomic profiling experiments. Anyone knows if there exists some tool for normalizing this type of data (raw data or XCMS matrix data) in R repositories? Many thanks in advance. Best

Re: [R] Plot a matrix recursively

2010-12-01 Thread Roland Rau
On 12/01/2010 02:43 PM, alcesgabbo wrote: I plot the first column with the following function: plot(m[,1],type=o, xaxt=n,ylim=c(min(m[,1:length(colnames(m))])-1, max(m[,1:length(colnames(m))])+1)) for the other columns I use there functions: lines(m[,2],type=\o\) lines(m[,3],type=\o\) ok,

Re: [R] Lattice dotplots

2010-12-01 Thread Peter Ehlers
On 2010-12-01 04:02, barbara.cha...@bayer.com wrote: Dear, I have a dataset with 4 subjects (see ID in example), and 4 treatment (see TRT in example) which are tested on 2 locations and in 3 blocs. By using Lattice dotplot, I made a graph that shows the raw data per location and per bloc. In

Re: [R] anova error

2010-12-01 Thread Peter Ehlers
It might be a good idea not to use an outdated version of R. I don't see your problem in R 2.12.0. Peter Ehlers On 2010-12-01 05:44, jean.cour...@math.u-psud.fr wrote: Just for fun This small program gives negative Sum of Sq in anova (with R versions 2.9.2 and 2.10.0) (linux 32 kernel

Re: [R] pca analysis: extract rotated scores?

2010-12-01 Thread Mark Difford
Hi He Zhang, Is the following right for extracting the scores? ... pca$loadings pca$score Yes. But you should be aware that the function principal() in package psych is standardizing your data internally, which you might not want. That is, the analysis is being based on the correlation

Re: [R] Lattice dotplots

2010-12-01 Thread Dieter Menne
barbara.chaves wrote: I have a dataset with 4 subjects (see ID in example), and 4 treatment (see TRT in example) which are tested on 2 locations and in 3 blocs. By using Lattice dotplot, I made a graph that shows the raw data per location and per bloc. In that graph, I would like to

Re: [R] Searching for packages for normalizing Metabolomic data

2010-12-01 Thread Martin Morgan
On 12/01/2010 05:57 AM, nquer...@clinic.ub.es wrote: Hi everybody, I am a beginner in the steps of pre-processing and data analysis of non-targeted metabolomic profiling experiments. Anyone knows if there exists some tool for normalizing this type of data (raw data or XCMS matrix

Re: [R] Where is gdata?

2010-12-01 Thread Gavin Simpson
On Wed, 2010-12-01 at 07:32 -0500, Gabor Grothendieck wrote: On Sun, Nov 28, 2010 at 6:44 AM, Stephen Liu sati...@yahoo.com wrote: snip / In the end it appears that there was no problem in accessing the gdata package or any of its components and that the poster's problem stemmed from issuing

Re: [R] ggplot2 histograms

2010-12-01 Thread Hadley Wickham
However if you do: ggplot(data=dafr, aes(x = d1, fill=d2)) + geom_histogram(binwidth = 1, position = position_dodge(width=0.99)) The position of first bin which goes from 0-2 appears to start at about 0.2 (I accept that there is some white space to the left of this) while the position of

[R] attempted merge() returns: cannot coerce type 'closure' to vector of type 'any'

2010-12-01 Thread Karl Brand
Hi Dimtris and esteemed useRs, I don't understand why i get this error message when attempting to use merge() - temp - merge(x, y[,17, drop=FALSE], by=rownames, sort=FALSE) Error in as.vector(x, mode) : cannot coerce type 'closure' to vector of type 'any' It should work because:

[R] New package Rd2roxygen: Convert Rd to roxygen documentation

2010-12-01 Thread Yihui Xie
Hi, A new package Rd2roxygen has been released on CRAN: http://cran.r-project.org/package=Rd2roxygen (source package available; binaries to come) This package can be useful for developers who used to document their functions in the raw Rd files but want to switch to roxygen now using inline

[R] log-normal Centile

2010-12-01 Thread Robert Quinn
I am having problems trying to get R to graph data input that is log-normal on the horizontal (x) axis. The data is log (base 10), and I am more interested in viewing the tails of the distribution. The closest I can get with this is log on the vertical (y) axis and linear on the horizontal axis.

[R] Wiener-Granger Causality Test in R

2010-12-01 Thread CALEF ALEJANDRO RODRIGUEZ CUEVAS
Hello dudes. I'm developing VAR analysis based on suggestions made by Horváth in its paper Canonical Correlation Analysis and Wiener-Granger Causality Tests. That's the reason I'm looking for if there's any R package to develop Wiener - Granger Causality Test. Thanks a lot for your unvaluable

Re: [R] anova error

2010-12-01 Thread David Winsemius
On Dec 1, 2010, at 9:18 AM, Peter Ehlers wrote: It might be a good idea not to use an outdated version of R. I don't see your problem in R 2.12.0. Furthermore isn't it a bit something to be asking why the sign on a number that is effectively zero happens to be negative? I would think

[R] Sequence for repeated numbers

2010-12-01 Thread Luana Marotta
Hello fellows, I would like to create a sequence for repeated numbers in a dataset. For example: ID - c(1:20) grade - c(4,4,4,5,5,7,7,7,7,8,8,8,9,9,9,9,9,10,10,10) Data: ID Grade 1 4 2 4 3 4 4 5 5 5 6 7 7 7 8 7 9 7 (...) I would like to create a variable sequence: Data: ID

Re: [R] ggplot2 histograms

2010-12-01 Thread Small Sandy (NHS Greater Glasgow Clyde)
Sorry this should have ben to the whole list: Hadley I think I've sorted it out in my head but for the record, and just to be sure... I guess what I was expecting was that the width parameter would be independent of binwidth. Thus a width parameter of 0.5 would always indicate an overlap of

[R] [R-lme] Extract estimated variances from output of lme?

2010-12-01 Thread Tingting Zhan
Hi all, I have the output of summary() of an lme object called lme.exp1, for example # summary(lme.exp1) Linear mixed-effects model fit by REML Data: DATA Log-restricted-likelihood: -430.8981 Fixed: fixed.exp1 Random effects:

Re: [R] anova error

2010-12-01 Thread Douglas Bates
On Wed, Dec 1, 2010 at 9:02 AM, Ben Bolker bbol...@gmail.com wrote: Peter Ehlers ehlers at ucalgary.ca writes: It might be a good idea not to use an outdated version of R. I don't see your problem in R 2.12.0. Peter Ehlers On 2010-12-01 05:44, Jean.Coursol at math.u-psud.fr wrote:

[R] Question regarding legend look

2010-12-01 Thread Filoche
Hi everyone. I have a quick question regarding the look of my legend in my plot. As you can see in the next figure, I have 3 series. http://r.789695.n4.nabble.com/file/n3067466/legend.png However, I find rather difficult to differentiate the series 1 and 3 according to their line type (lty).

Re: [R] Simple question on eval

2010-12-01 Thread Joshua Wiley
Here are two options that might work for you given the little bit you've said: ## If its the same parameter all 30 times ## say, for example, base = 4.5 to log for(i in 1:30) { print(log(1:10, base = 4.5)) } ## if they are different parameters, you could try lapply(X = c(1.3, 3, 2.2, 4, 5),

Re: [R] Sequence for repeated numbers

2010-12-01 Thread Jonathan P Daily
Try this: ord - order(grade) ID - Id[ord] grade - grade[ord] sequence - unlist(sapply(table(grade), FUN = function(x) 1:x), use.names = F) And as a general tip, it is much easier to work with related values like ID and grade if they are in a data frame. Such as: dat - data.frame(ID,

Re: [R] missing values

2010-12-01 Thread Doran, Harold
You can also explore the classical() function in the MiscPsycho package that does item analysis. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Iasonas Lamprianou Sent: Wednesday, December 01, 2010 4:52 AM To: Michael

Re: [R] Sequence for repeated numbers

2010-12-01 Thread Jorge Ivan Velez
Hi Luana, Try this: ID - 1:20 grade - c(4, 4, 4, 5, 5, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10) d - data.frame(ID, grade) d$Sequence - do.call(c, sapply(rle(grade)$lengths, seq)) d HTH, Jorge On Wed, Dec 1, 2010 at 11:08 AM, Luana Marotta wrote: Hello fellows, I would like to

Re: [R] Sequence for repeated numbers

2010-12-01 Thread Phil Spector
Luana - It's probably not the most efficient way, but here's a solution that's not dependent on the grades being sorted: grade - c(4,4,4,5,5,7,7,7,7,8,8,8,9,9,9,9,9,10,10,10) unlist(sapply(rle(grade)$lengths,function(x)seq(1,x))) [1] 1 2 3 1 2 1 2 3 4 1 2 3 1 2 3 4 5 1 2 3

Re: [R] parametric estimators for species richness in R

2010-12-01 Thread Gavin Simpson
On Wed, 2010-12-01 at 21:23 +0800, yangwenjing wrote: Dear everyone, I am doing some work about species richness estimation. Nonparametric estimation (such as Chao1, Jacknife1) can be done just using function specpool() and estimateR() in package vegan. The problem is that I can not found

Re: [R] Question regarding legend look

2010-12-01 Thread David Winsemius
On Dec 1, 2010, at 10:13 AM, Filoche wrote: Hi everyone. I have a quick question regarding the look of my legend in my plot. As you can see in the next figure, I have 3 series. http://r.789695.n4.nabble.com/file/n3067466/legend.png However, I find rather difficult to differentiate the

Re: [R] Question regarding legend look

2010-12-01 Thread David Winsemius
On Dec 1, 2010, at 11:51 AM, David Winsemius wrote: On Dec 1, 2010, at 10:13 AM, Filoche wrote: Hi everyone. I have a quick question regarding the look of my legend in my plot. As you can see in the next figure, I have 3 series. http://r.789695.n4.nabble.com/file/n3067466/legend.png

[R] Beta values ca.jo

2010-12-01 Thread mliugonzal
Hello Anyone know how can I calculate the value of the beta parameter when I know the number of cointegrating relationships between two variables. I mean, I using the procedure: ca.jo I do the following: summary (ca.jo (UR [, c (2.52)], type = trace ECDET = trend, K = 2, spec = longrun))

Re: [R] confidence interval for logistic joinpoint regression from package ljr

2010-12-01 Thread Vito Muggeo (UniPa)
dear M., I do not know how to get the SE for the joinpoint (or breakpoint) from your ljr fit. However you can find useful the segmented package which works for any GLM (including the logistic one) and it returns (approximate) StErr (and Conf Int) also for the joinpoint (breakpoint in the

Re: [R] Sequence for repeated numbers

2010-12-01 Thread Greg Snow
Try this: id - 1:20 grade - c(4,4,4,5,5,7,7,7,7,8,8,8,9,9,9,9,9,10,10,10) sequence - ave( id, grade, FUN=seq ) # if grade is not sorted grade2 - sample(grade) sequence2 - ave( id, grade2, FUN=seq ) cbind( grade2, sequence2 ) -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center

Re: [R] Poisson GLM warning message

2010-12-01 Thread Prof Brian Ripley
On Wed, 1 Dec 2010, Anna Berthinussen wrote: Hi, I receive the following warning message when I run a poisson GLM in R: glm.fit: fitted rates numerically 0 occurred The model summary is shown below. The variable 'Species' consists of counts of different species ranging from 0 to 4. I suspect

Re: [R] Question regarding legend look

2010-12-01 Thread Duncan Murdoch
On 01/12/2010 10:13 AM, Filoche wrote: Hi everyone. I have a quick question regarding the look of my legend in my plot. As you can see in the next figure, I have 3 series. http://r.789695.n4.nabble.com/file/n3067466/legend.png However, I find rather difficult to differentiate the series 1

[R] How to pass selection criteria in a function

2010-12-01 Thread CMcCarthy
Hi, Suppose I have the following data name score Abel    88 Baker  54 Charlie    77 stored a  table called myData. I want to write a function that will create a table which is a subset of myData containing those have a score 75. I know I can do this with the following command:

Re: [R] How to pass selection criteria in a function

2010-12-01 Thread Charles C. Berry
On Wed, 1 Dec 2010, cmccar...@bmcc.cuny.edu wrote: Hi, Suppose I have the following data name score Abel??? 88 Baker? 54 Charlie??? 77 stored a? table called myData. I want to write a function that will create a table which is a subset of myData containing those have a score

Re: [R] How to pass selection criteria in a function

2010-12-01 Thread Henrique Dallazuanna
Try this: newTable - function(data, criteria) { do.call(subset, list(data, substitute(criteria))) } On Wed, Dec 1, 2010 at 3:56 PM, cmccar...@bmcc.cuny.edu wrote: Hi, Suppose I have the following data name score Abel88 Baker 54 Charlie77 stored a table called

Re: [R] Graph in R with edge weights

2010-12-01 Thread Ivan Alves
Hi Arthur, I was asking the same thing and came across the following (your need the sna library). http://students.washington.edu/mclarkso/documents/gplot%20Ver2.pdf Take a look at the edge.lwd and vertex.cex examples of the function gplot. You can use vectors for the different nodes. Kind

Re: [R] How to pass selection criteria in a function

2010-12-01 Thread ChrisMath
Thank you all for your very fast replies. I tried Henrique's method (see one of the above posts) , and it works perfectly! Thanks again! -- View this message in context: http://r.789695.n4.nabble.com/How-to-pass-selection-criteria-in-a-function-tp3067765p3067829.html Sent from the R help

Re: [R] How to pass selection criteria in a function

2010-12-01 Thread David Winsemius
On Dec 1, 2010, at 1:12 PM, Charles C. Berry wrote: On Wed, 1 Dec 2010, cmccar...@bmcc.cuny.edu wrote: Hi, Suppose I have the following data name score Abel88 Baker 54 Charlie77 stored a table called myData. I want to write a function that will create a table which

Re: [R] Question regarding legend look

2010-12-01 Thread Filoche
David Winsemius wrote: ...BUT NOT SHOWN US CODE OR SAMPLE DATA. Hi and thank you for your help. For instance, here's my code: legend(topleft, inset = .05, title=Water masses, pch = c(22,25,21), lty = c(4,1,2), lwd = 1, c(North,Central,South), horiz = F, pt.bg

Re: [R] Question regarding legend look

2010-12-01 Thread Filoche
Thank you sir for your answer. I'll take a look at the original legend function and modify it for my own purpose. With regards, Phil -- View this message in context: http://r.789695.n4.nabble.com/Question-regarding-legend-look-tp3067466p3067894.html Sent from the R help mailing list archive at

[R] default arguments and '...' in a function

2010-12-01 Thread Antonio.Gasparrini
Dear R-users, I'm trying to work out a way to set default values for arguments in a function which includes the optional argument '...'. In practice, I have a 'plot' method for a function which specifies different types of plots. Every different plot should have different default arguments

Re: [R] Font family not found in Windows font database

2010-12-01 Thread Paul Murrell
Hi On 2/12/2010 4:55 a.m., Mark Ebbert wrote: Dear R Gurus, I have a fairly simple problem, but I haven't been able to find the answer on 'the google' or in the r-help archives. I am generating plots on both Windows and OS X where I need to guarantee that the font used is Arial. In my plot

Re: [R] Wiener-Granger Causality Test in R

2010-12-01 Thread Dennis Murphy
Hi: On Wed, Dec 1, 2010 at 7:49 AM, CALEF ALEJANDRO RODRIGUEZ CUEVAS alejandro.rodriguez.cue...@gmail.com wrote: Hello dudes. I'm developing VAR analysis based on suggestions made by Horváth in its paper Canonical Correlation Analysis and Wiener-Granger Causality Tests. Poor Horvath has

Re: [R] Minor warning about seq

2010-12-01 Thread Ray Brownrigg
I think both responses so far have missed the point, (assuming the O was a typo for zero). That is: seq(0:1) [1] 1 2 when seq(0,1) [1] 0 1 was intended. Ray Brownrigg On Wed, 01 Dec 2010, Ista Zahn wrote: So you are warning us that you must type zero instead of the letter O when we want to

Re: [R] [R-lme] Extract estimated variances from output of lme?

2010-12-01 Thread Ben Bolker
Tingting Zhan tingting.zhan at jefferson.edu writes: Hi all, I have the output of summary() of an lme object called lme.exp1, for example # summary(lme.exp1) [snip] for the common variance parameter sigma. But if I need the

[R] Extract specific rows from matrix

2010-12-01 Thread Ali S
I have a matrix with 3 years of data (2006, 2009, 2010). I am trying to split this matrix by year so that I have 3 separate matrices. My matrix looks like this:     Q16.1 Year Gender Grade1       3 2006      1     52       2 2006      0     53       3 2006      0     54       3 2006      0    

[R] draw categorical histogram

2010-12-01 Thread phoebe kong
Hi, Can someone tell me how to draw a histogram for the following summary? Richard Minnie Albert Helen Joe Kingston 1233 56 6715 66 The summary tell that Richard has occurrence 12, Minnie has occurrence 33, and so on. I would like to view this

Re: [R] draw categorical histogram

2010-12-01 Thread Andrew Miles
Try: plot (myCatVariable) Andrew Miles Department of Sociology Duke University On Dec 1, 2010, at 2:51 PM, phoebe kong wrote: Hi, Can someone tell me how to draw a histogram for the following summary? Richard Minnie Albert Helen Joe Kingston 1233 56 67

Re: [R] Extract specific rows from matrix

2010-12-01 Thread Jorge Ivan Velez
Hi Ali, Check ?split HTH, Jorge On Wed, Dec 1, 2010 at 2:50 PM, Ali S wrote: I have a matrix with 3 years of data (2006, 2009, 2010). I am trying to split this matrix by year so that I have 3 separate matrices. My matrix looks like this: Q16.1 Year Gender Grade1 3 2006 1

[R] procrustes results affected by order of sites in input file

2010-12-01 Thread Christine Dolph
Dear All, I am using a Procrustes analysis to compare two NMDS ordinations for the same set of sites. One ordination is based on fish data, the other is based on invertebrate data. Ordinations were derived using metaMDS() from the {vegan} library as follows: fish.mds-metaMDS(fish.data,

Re: [R] Font family not found in Windows font database

2010-12-01 Thread Mark Ebbert
That did it. Thanks! On Dec 1, 2010, at 12:38 PM, Paul Murrell wrote: Hi On 2/12/2010 4:55 a.m., Mark Ebbert wrote: Dear R Gurus, I have a fairly simple problem, but I haven't been able to find the answer on 'the google' or in the r-help archives. I am generating plots on both

Re: [R] parametric estimators for species richness in R

2010-12-01 Thread Dennis Murphy
Hi: When the question is: 'Are there any functions in R for pick your topic?', package sos is a good place to start: library(sos) # install if necessary findFn('MMeans') Well actually, MMMeans and MMruns came up dry, but Michaelis-Menten is a commonly occurring model in the biosciences:

Re: [R] draw categorical histogram

2010-12-01 Thread phoebe kong
This would not draw a histogram. On Wed, Dec 1, 2010 at 11:54 AM, Andrew Miles rstuff.mi...@gmail.comwrote: Try: plot (myCatVariable) Andrew Miles Department of Sociology Duke University On Dec 1, 2010, at 2:51 PM, phoebe kong wrote: Hi, Can someone tell me how to draw a histogram

Re: [R] default arguments and '...' in a function

2010-12-01 Thread Sarah Goslee
Antonio, You need to compare the names of list(...) with the arguments you wish to check. Here's one way to do so (note that I replaced c with d, because c is a function): f - function(a, ...) { argnames - names(list(...)) # check whether b is an argument if(!(b %in%

Re: [R] draw categorical histogram

2010-12-01 Thread Jorge Ivan Velez
Hi Phoebe, Try x - c(12, 33, 56, 67, 15, 66) names(x) - c('Richard','Minnie','Albert','Helen','Joe','Kingston') barplot(x, las = 1, space = 0) HTH, Jorge On Wed, Dec 1, 2010 at 2:51 PM, phoebe kong wrote: Hi, Can someone tell me how to draw a histogram for the following summary?

Re: [R] missing values

2010-12-01 Thread Iasonas Lamprianou
thank you, I'll have a good look and come back to you if necessary Dr. Iasonas Lamprianou Assistant Professor (Educational Research and Evaluation) Department of Education Sciences European University-Cyprus P.O. Box 22006 1516 Nicosia Cyprus Tel.: +357-22-713178 Fax: +357-22-590539

Re: [R] map() and pdf clipping

2010-12-01 Thread Paul Murrell
Hi On 1/12/2010 4:44 a.m., Peter Ehlers wrote: On 2010-11-30 04:56, Ben Tupper wrote: Hi, I thought it might help if I posted the resulting images. This is the pdf file where the map polygons are not clipped to the plotting boundary. http://dl.dropbox.com/u/8433654/test-map.pdf And this is

  1   2   >