[R] Help with layout

2013-02-22 Thread philippe massicotte
Dear R users. I'm new with layout and I can't figure how to teak my graphs. I have the following code: layout(matrix(c(1,2,3), 3, 1, byrow = TRUE), heights=c(0.3,0.3,0.6)) boxplot(rnorm(100), horizontal=TRUE, axes=FALSE) boxplot(rnorm(100), horizontal=TRUE, axes=FALSE) hist(rnorm(100))

Re: [R] Issue with matrices within nested for-loops

2013-02-22 Thread Bert Gunter
> Which I understand to mean that the bounds of the indicated vector/matrix > have been violated. I am however at a loss as to how to resolve this ... Presumably because you haven't learned to use R's debugging tools. So time to learn. See the "debugging" Chapter of the R Language Manual and the H

Re: [R] package ReadImages

2013-02-22 Thread John
Petr, Another program that may be useful is ImageJ which has a great many useful analytic plugins. The program is written in Java and it supports a good many different image file formats. You should also be able to use Octave to normalize an image. JWDougherty _

Re: [R] assign index to colnames(matrix)

2013-02-22 Thread Prew, Paul
Jim, thank you, that worked great. Paul Prew | Statistician 651-795-5942   |   fax 651-204-7504 Ecolab Research Center | Mail Stop ESC-F4412-A 655 Lone Oak Drive | Eagan, MN 55121-1560 -Original Message- From: Jim Lemon [mailto:j...@bitwrit.com.au] Sent: Friday, February 22, 2013

[R] Issue with matrices within nested for-loops

2013-02-22 Thread Jonathan Richar
Greetings! I am trying to compare simulated environmental conditions from a model against a recruitment time series for a species of crab by first dropping 5 data points, and then using the remainder to attempt to simulate the missing data as a measure of best fit and using the following code: a

Re: [R] help with R CMD check --as-cran

2013-02-22 Thread David Winsemius
On Feb 22, 2013, at 5:52 PM, Joshua Wiley wrote: > Hi Tao, > > I wonder if you are on Windows? If so, make sure you have qpdf > installed, and the location is in your path. > > Cheers, > > Josh > > On Fri, Feb 22, 2013 at 3:32 PM, Tao Wang wrote: >> Hi Everyone! >> >> This is my first time

Re: [R] help with R CMD check --as-cran

2013-02-22 Thread Joshua Wiley
Hi Tao, I wonder if you are on Windows? If so, make sure you have qpdf installed, and the location is in your path. Cheers, Josh On Fri, Feb 22, 2013 at 3:32 PM, Tao Wang wrote: > Hi Everyone! > > This is my first time using R-help. I am trying to do R CMD check before > uploading my package

[R] Climate Spatial plot

2013-02-22 Thread Bedassa Regassa
Dear Sir, I am beginner in using R. I am working on climate and like to plot spatial but I can't able to go ahead. I know it is too simply but not for me. Here is attached the data and my sample script. I am waiting R-users to solve my problem. Your help is valuable for me. Thank you. -- -

[R] help with R CMD check --as-cran

2013-02-22 Thread Tao Wang
Hi Everyone! This is my first time using R-help. I am trying to do R CMD check before uploading my package to CRAN. R CMD check --as-cran "my package folder". However, it spits out this warning: "pdf is needed for checks on size reduction of PDFs" I searched online but found no clue to solve

Re: [R] R on mac not installing packages

2013-02-22 Thread londonphd
Many thanks to all who replied to this post. the problem has now been sorted out. i installed "GCC-10.7-v2.pkg", now i can install packages from source -- View this message in context: http://r.789695.n4.nabble.com/R-on-mac-not-installing-packages-tp4659392p4659414.html Sent from the R help ma

Re: [R] assign index to colnames(matrix)

2013-02-22 Thread Jim Lemon
On 02/23/2013 11:34 AM, Prew, Paul wrote: Hello, I’m trying to follow the syntax of a script from a journal website. In order to create a regression formula used later in the script, the regression matrix must have column names “X1�, “X2�, etc. I have tried to assign these column

Re: [R] Controlling Order of Panels in Lattice Trellis Plots

2013-02-22 Thread Bert Gunter
As you appear not to know, or at least have not stated, **what** you want to do, how can you expect anyone to tell you **how** to do it? Cheers, Bert On Fri, Feb 22, 2013 at 2:33 PM, Rich Shepard wrote: > On Fri, 22 Feb 2013, Bert Gunter wrote: > >> You do not need to use ordered factors. >> new

[R] assign index to colnames(matrix)

2013-02-22 Thread Prew, Paul
Hello, I’m trying to follow the syntax of a script from a journal website. In order to create a regression formula used later in the script, the regression matrix must have column names “X1”, “X2”, etc. I have tried to assign these column names to my matrix ScoutRSM.mat using a for

Re: [R] Fitting this data with a gaussian would be great

2013-02-22 Thread Ben Bolker
Samantha Warnes wisc.edu> writes: > > Hello,I'm still working with this data set, and > trying to fit it with a nonlinear model. Here is my data > > small <- c(507680,507670,508832,510184,511272,513380,515828, 519160,525046, 534046,547982,567124,590208,614506,637876,656846,669054,672976,668

[R] Fitting this data with a gaussian would be great

2013-02-22 Thread Samantha Warnes
Hello,I'm still working with this data set, and trying to fit it with a nonlinear model. Here is my data > small <- > c(507680,507670,508832,510184,511272,513380,515828,519160,525046,534046,547982,567124,590208,614506,637876,656846,669054,672976,668800,656070,637136,614342,590970,570752,554480,54

Re: [R] Help xyplot

2013-02-22 Thread Peter Maclean
Hi Mackay and anybody (a) Is it possible to select randomly (let say five grids) and plot? (b) Is it possible to plot five nearest grid in one figure? The original question and improved codes: #I am ploting gridded time series data. I would like the actual lat #and lon value appear on the graph-

[R] Issues with installing RBGL package

2013-02-22 Thread jason tyler
Hi all, I was installing a package *RBGL* of bioconductor. However, I had some issues while installing it. I asked the devel group of bioconductor and they told me to consult this group. Here is my conversation with the bioconductor group related to the problem *Me->* I was trying to install the

Re: [R] HELP!!!

2013-02-22 Thread Ben Bolker
David Winsemius comcast.net> writes: > On Feb 22, 2013, at 11:02 AM, lara sowale wrote: > > > I am sorry to bug you, I am having this error whenever I want to run > > random effects regression in software R: Error in if (sigma2$id < 0) > > stop(paste("the estimated variance of the", : > > mis

Re: [R] Controlling Order of Panels in Lattice Trellis Plots

2013-02-22 Thread Rich Shepard
On Fri, 22 Feb 2013, Bert Gunter wrote: You do not need to use ordered factors. newfac <- factor(oldfac, lev= ...) ## will do it. e.g. x <- factor(letters[1:3]) ## default ordering is alphabetic (mod locale) x [1] a b c Levels: a b c y <- factor(x,lev=letters[3:1]) ## reorder the levels y

Re: [R] Controlling Order of Panels in Lattice Trellis Plots

2013-02-22 Thread Rich Shepard
On Fri, 22 Feb 2013, David Winsemius wrote: `is.ordered` will return TRUE if it is an ordered factor. That's not what you want to know and using `as.ordered` would also fail to provide the needed ordering. You need to provide a proper levels argument to the factor function. And you will find tha

Re: [R] locating boxplot in bwplot (lattice)

2013-02-22 Thread Ben Bolker
Elaine Kuo gmail.com> writes: > > Hello > > I am using lattice bwplot to draw migration distance of three groups of > birds. > > The boxplots from the left to right is displayed > in alphabetic order of the boxplot names, as the default setting. > > However, I would like the boxplots from the

[R] locating boxplot in bwplot (lattice)

2013-02-22 Thread Elaine Kuo
Hello I am using lattice bwplot to draw migration distance of three groups of birds. The boxplots from the left to right is displayed in alphabetic order of the boxplot names, as the default setting. However, I would like the boxplots from the left to right to be displayed according to the

Re: [R] R on mac not installing packages

2013-02-22 Thread Marc Schwartz
On Feb 22, 2013, at 3:46 PM, Prof Brian Ripley wrote: > On 22/02/2013 21:26, David Winsemius wrote: >> The system is reporting that it cannot find `make`. It appears that you have >> not installed XCode on you Mac, or that you did with an earlier version for >> which you have not updated, or s

Re: [R] Controlling Order of Panels in Lattice Trellis Plots

2013-02-22 Thread David Winsemius
On Feb 22, 2013, at 1:22 PM, Rich Shepard wrote: > On Fri, 22 Feb 2013, Bert Gunter wrote: > >> Manually change the ordering of the levels in the factor to that which you >> want (see ?factor if necessary) and replot. > > Bert, > > I'll do this. > > I looked at ?factor and will try is.order

Re: [R] R on mac not installing packages

2013-02-22 Thread Prof Brian Ripley
On 22/02/2013 21:26, David Winsemius wrote: The system is reporting that it cannot find `make`. It appears that you have not installed XCode on you Mac, or that you did with an earlier version for which you have not updated, or something else which has broken your installation. Please read the

Re: [R] Controlling Order of Panels in Lattice Trellis Plots

2013-02-22 Thread Bert Gunter
You do not need to use ordered factors. newfac <- factor(oldfac, lev= ...) ## will do it. e.g. > x <- factor(letters[1:3]) ## default ordering is alphabetic (mod locale) > x [1] a b c Levels: a b c > y <- factor(x,lev=letters[3:1]) ## reorder the levels > y [1] a b c Levels: c b a -- Bert On F

Re: [R] R on mac not installing packages

2013-02-22 Thread David Winsemius
The system is reporting that it cannot find `make`. It appears that you have not installed XCode on you Mac, or that you did with an earlier version for which you have not updated, or something else which has broken your installation. Please read the MacOS FAQ. (And post further such question on

Re: [R] Controlling Order of Panels in Lattice Trellis Plots

2013-02-22 Thread David Winsemius
On Feb 22, 2013, at 11:29 AM, Rich Shepard wrote: > On Fri, 22 Feb 2013, David Winsemius wrote: > >> It appears these may be factors. No much in the way of code can be offered >> since you have provided none of hte requested details. > > Yes, David, strip labels are factors. What sort of detai

Re: [R] Controlling Order of Panels in Lattice Trellis Plots

2013-02-22 Thread Rich Shepard
On Fri, 22 Feb 2013, Bert Gunter wrote: Manually change the ordering of the levels in the factor to that which you want (see ?factor if necessary) and replot. Bert, I'll do this. I looked at ?factor and will try is.ordered() to see if that makes a difference. Many thanks, Rich ___

[R] Fwd: difficulty defining variables as categorical using Gower with DAISY

2013-02-22 Thread Joanna Papakonstantinou
> I am using the iris dataset that contains mixed variables (some columns are > numeric and some categorical). > > > > iris > Sepal.Length Sepal.Width Petal.Length Petal.WidthSpecies > 15.1 3.5 1.4 0.2 setosa > 24.9 3.0

Re: [R] Getting htmlParse to work with Hebrew? (on windows)

2013-02-22 Thread Lawr Eskin
I thiknk that I have to install Linux on VM... There is a shortest way by the way, could you please advise how to rebuild 'XML' package for R with latest libxml sources? Who may do that? or is it possible to build the new R package based on another non-C sorced parsers based like on PyPY, erlang a

[R] R on mac not installing packages

2013-02-22 Thread londonphd
Hi, I have not been able to use R in my macbook pro. I am getting the following error message every time i try to install a package * installing *source* package ‘Hmisc’ ... ** package ‘Hmisc’ successfully unpacked and MD5 sums checked ** libs *** arch - i386 sh: make: command not found ERROR: co

Re: [R] Controlling Order of Panels in Lattice Trellis Plots

2013-02-22 Thread Bert Gunter
Manually change the ordering of the levels in the factor to that which you want (see ?factor if necessary) and replot. -- Bert On Fri, Feb 22, 2013 at 11:17 AM, David Winsemius wrote: > > On Feb 22, 2013, at 11:02 AM, Rich Shepard wrote: > >> With multiple panels in a lattice trellis plot the s

Re: [R] HELP!!!

2013-02-22 Thread Nicole Ford
Wow, Jim- fun tid bit! Unrelated to op, but I will say thank you- as I know it will be useful! ~Nicole Ford Ph.D. Student Graduate Assistant/ Instructor Department of Government and International Affairs University of South Florida office: SOC 012M e: nmhi...@mail.usf.edu http://gia.usf.edu/stud

Re: [R] Controlling Order of Panels in Lattice Trellis Plots

2013-02-22 Thread Rich Shepard
On Fri, 22 Feb 2013, David Winsemius wrote: It appears these may be factors. No much in the way of code can be offered since you have provided none of hte requested details. Yes, David, strip labels are factors. What sort of detail would you like to see to advise me on how to specify the ord

Re: [R] HELP!!!

2013-02-22 Thread jim holtman
Run with: options(error=utils::recover) Then at the point of the error you will be able to examine sigma2$id which is probably not a numeric. Any time you get an error like this, if you have been using the above statement in your script (which I always have turned on), you will be able to discov

Re: [R] Controlling Order of Panels in Lattice Trellis Plots

2013-02-22 Thread David Winsemius
On Feb 22, 2013, at 11:02 AM, Rich Shepard wrote: > With multiple panels in a lattice trellis plot the sequence is, for > example, 1, 10, 11, 12, 2, 3, 4. I want the sequence to be 1, 2, 3, 4, 10, > 11, 12. > It appears these may be factors. No much in the way of code can be offered since you

Re: [R] HELP!!!

2013-02-22 Thread David Winsemius
On Feb 22, 2013, at 11:02 AM, lara sowale wrote: > I am sorry to bug you, I am having this error whenever I want to run > random effects regression in software R: Error in if (sigma2$id < 0) > stop(paste("the estimated variance of the", : > missing value where TRUE/FALSE needed. > > Please he

[R] Controlling Order of Panels in Lattice Trellis Plots

2013-02-22 Thread Rich Shepard
With multiple panels in a lattice trellis plot the sequence is, for example, 1, 10, 11, 12, 2, 3, 4. I want the sequence to be 1, 2, 3, 4, 10, 11, 12. Reading ?strip.default and the appropriate section in the Lattice book I'm not seeing how to specify the 'human' numeric order rather than the

Re: [R] remove rows in data frame by average

2013-02-22 Thread David Winsemius
On Feb 21, 2013, at 2:15 PM, William Dunlap wrote: > Many find the functions in the plyr package more convenient to use than the > do.call(rbind, lapply(split(...),...) business: > >> library(plyr) >> ddply(dat1, .(Subject,Block), summarize, MeanFeature1=mean(Feature1), >> MeanFeature2=mean(Fe

[R] HELP!!!

2013-02-22 Thread lara sowale
I am sorry to bug you, I am having this error whenever I want to run random effects regression in software R: Error in if (sigma2$id < 0) stop(paste("the estimated variance of the", : missing value where TRUE/FALSE needed. Please help me look into it. [[alternative HTML version delete

Re: [R] How to do generalized linear mixed effects models

2013-02-22 Thread Ross Boylan
On 2/21/2013 6:02 PM, Mitchell Maltenfort wrote: > One more link to look at > > http://glmm.wikidot.com/faq > > This is the r-sig-mixed-models FAQ. Thanks so much for pointing that out. That seems to confirm that what I want is lme4, in particular glmer(). Ross > > On Thu, Feb 21, 2013 at 8:53 PM

Re: [R] package ReadImages

2013-02-22 Thread Greg Snow
For some of the fancier transforms it may be easier to use an outside tool such as Imagemagick which will do a lot of these things. There is even a C++ interface to imagemagick that may work nicely with packages like Rcpp if you don't want to use an intermediate file. But jobs like converting to

Re: [R] How to merge two functions into one?

2013-02-22 Thread Rui Barradas
Hello, Instead of try(cor.test) you could try(return_cor). Also, isn't there a bug in return_cor? See the commented line below. return_cor = function(x, y, tresh = 0.05) { z = cor.test(x,y) if(z[[3]] < tresh) { return(z[[4]]) # not z[[5]], always zero } else

Re: [R] Netcdf file in R

2013-02-22 Thread Jon Olav Skoien
I would also suggest the package raster, which usually make it much easier to extract spatial NetCDF-data than direct use of the NetCDF-packages. Bests, Jon On 22-Feb-13 17:14, Marc Schwartz wrote: NetCDF is a binary file format and will be stripped by the list server filters. Don't bother a

Re: [R] Netcdf file in R

2013-02-22 Thread Marc Schwartz
NetCDF is a binary file format and will be stripped by the list server filters. Don't bother attaching it unless the two of you want to communicate off-list. Anup has not indicated what he has actually tried to do to read in the file. R will not natively read NetCDF files, so he will need to use

Re: [R] Netcdf file in R

2013-02-22 Thread Michael Sumner
There are at least three packages that can read NetCDF in native form, RNetCDF, ncdf and ncdf4. There are other options. Explore these ones. Cheers, Mike. On Sat, Feb 23, 2013 at 2:48 AM, Gyanendra Pokharel wrote: > I can't see your attached file. Can you re-attache it? > Thanks > Gyanendra Pok

Re: [R] Getting htmlParse to work with Hebrew? (on windows)

2013-02-22 Thread Milan Bouchet-Valat
Le jeudi 21 février 2013 à 18:53 +0400, Lawr Eskin a écrit : > iconv trued before in various try, same issue and result with encoding > = unknown > now try sub - same issue This procedure works on Linux, but not on Windows: library(RCurl) library(XML) u <- "http://www.cian.ru/cat.php?deal_type=2&o

Re: [R] Netcdf file in R

2013-02-22 Thread Gyanendra Pokharel
I can't see your attached file. Can you re-attache it? Thanks Gyanendra Pokharel University of Guelph Guelph, ON On Fri, Feb 22, 2013 at 7:58 AM, Anup khanal wrote: > > Good afternoon, > I am a new in R. I have to work with large climate data.I am not able to > read the netcdf file. Can anyone

[R] Is there a way to set the number of observations per cluster?

2013-02-22 Thread dma814
Say, under K-means, would there be a way to set a number (of observations/members) to a clustering solution in order to obtain an evenly distributed set of clusters? -- View this message in context: http://r.789695.n4.nabble.com/Is-there-a-way-to-set-the-number-of-observations-per-cluster-tp465

[R] Netcdf file in R

2013-02-22 Thread Anup khanal
Good afternoon, I am a new in R. I have to work with large climate data.I am not able to read the netcdf file. Can anyone try with this file attached ? Best Regards, ..Anup KhanalNorwegian Institute of science and Technology (NTNU)Trondheim, NorwayMob:(+47) 45174313

[R] How to merge two functions into one?

2013-02-22 Thread Jonsson
I am using the code below to calculate the correlation map between two datasets. This code worked fine. dir1 <- list.files("D:thly", "*.bin", full.names = TRUE) dir2 <- list.files("D:002", "*.envi", full.names = TRUE) file_tot <- array(dim = c(1440, 720, 11, 2)) for(i in 1:length(d

Re: [R] Merging data in arrays

2013-02-22 Thread Rui Barradas
Hello, I bet there are simpler solutions but I'm not thinking of anything else, right now. fun <- function(x, y){ f <- function(a, b){ a <- as.data.frame(a) b <- as.data.frame(b) names(a)[1] <- names(b)[1] <- "V1" res <- m

Re: [R] total indirect effects in structural equation modeling using lavaan

2013-02-22 Thread Marios
Waow awesome!! It worked perfectly! Thanks heaps Yves! Greatly appreciated! Marios On 22 February 2013 12:45, yrosseel wrote: > On 02/22/2013 11:40 AM, Marios wrote: > >> Thank you very much Yves! >> >> I have managed to get the total indirect effects that i wanted but it >> seems to only wo

Re: [R] (senza oggetto)

2013-02-22 Thread Ista Zahn
Hi Eleonora, To unsubscribe, click the mailing list link at the bottom of this (and every) r-help message, scroll to the bottom and follow the unsubscribe instructions. Best, Ista On Fri, Feb 22, 2013 at 7:02 AM, Eleonora Schiano wrote: > i would like to unsubscribe from the mailing list > Than

[R] (senza oggetto)

2013-02-22 Thread Eleonora Schiano
i would like to unsubscribe from the mailing list Thank's [[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-gu

[R] Model selection in nonstationary VAR

2013-02-22 Thread M M
Folks, Is there any implementation available in R for the simultaneous selection of lag order and rank of a nonstationary VAR as described in Chao & Phillips (1999): Model selection in partially nonstationary vector autoregressive processes with reduced rank structure, J. Econ. (91). Or any othe

[R] pgirmess install under linux mint 14 / a solution

2013-02-22 Thread Pierre-Henri Puech
hi there, after bumping into a problem for installing pgirmess package in linux mint 14, i figured out this solution that seemed to work fine --- * in synaptic or similar software : installation of proj dev lib & dependances # to sort out problems of rgdal installation of lib

Re: [R] total indirect effects in structural equation modeling using lavaan

2013-02-22 Thread Marios
Thank you very much Yves! I have managed to get the total indirect effects that i wanted but it seems to only work on the unstandardized coefficients. I use "standardized =TRUE" in the "summary" command but the "std.all" column has the same values as the "Estimate" (unstandardized) column for the

Re: [R] 2 setGeneric's, same name, different method signatures

2013-02-22 Thread Romain Fenouil
Dear Martin Morgan, thank you very much for your answer that made it clear to me. Since my package is linked to yours by essence, there is no reason to redefine the existing setGeneric functions. As a summary, if someone is importing functions from another package, he is supposed to know they alr

[R] Is it possible to obtain an agglomeration schedule with R cluster analyis

2013-02-22 Thread Bob Green
Hello, In SPSS the cluster analysis output includes an agglomerations schedule, which details the stages when cases are joined. Is it possible to obtain such output when performing cluster analysis in R? If so, I'd appreciate advice regarding how to obtain this information. Any assistance

Re: [R] total indirect effects in structural equation modeling using lavaan

2013-02-22 Thread yrosseel
On 02/22/2013 11:40 AM, Marios wrote: Thank you very much Yves! I have managed to get the total indirect effects that i wanted but it seems to only work on the unstandardized coefficients. I use "standardized =TRUE" in the "summary" command but the "std.all" column has the same values as the "Es

Re: [R] package ReadImages

2013-02-22 Thread PIKAL Petr
Thanks. I tried EBImage several years ago for another problem, but Bioconductor packages have some difficulties to install in our network/firewall environment and I am not in a position to change it. It seems to me also an overkill for such simple task. jpeg and png seems to me a bit too much

Re: [R] (no subject)

2013-02-22 Thread PIKAL Petr
Hi I understood that OP wanted to know how many columns s/he has. Anyway, s/he got plenty of answers which can inspect and choose one which corresponds to the problem. Regards Petr > -Original Message- > From: Rolf Turner [mailto:rolf.tur...@xtra.co.nz] > Sent: Friday, February 22, 2013

Re: [R] package ReadImages

2013-02-22 Thread PIKAL Petr
Hi > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Prof Brian Ripley > Sent: Friday, February 22, 2013 8:17 AM > To: r-help@r-project.org > Subject: Re: [R] package ReadImages > > On 22/02/2013 05:44, Greg Snow wrote: > > Som

Re: [R] total indirect effects in structural equation modeling using lavaan

2013-02-22 Thread yrosseel
On 02/21/2013 03:59 PM, Marios wrote: My question...I would like to calculate the total indirect effects of all variables on the right-hand-side of the regression eqn's so that i can work out the total effect (indirect effects + direct effect) I know the direct effect and i can calculate the

[R] [R-pkgs] knitr version 1.1

2013-02-22 Thread Yihui Xie
Hi, I released knitr 1.1 to CRAN a few days ago: http://cran.r-project.org/package=knitr See all new features and changes at https://github.com/yihui/knitr/blob/master/NEWS.md#changes-in-knitr-version-11 The version 1.0 does not imply perfect stability or maturity. The major version number was b