Re: [R] Network issue

2024-02-20 Thread stephen sefick
Maybe I missed the rest of the post? You are more likely to get help with
your problems if you create a minimal reproducible example.
Kindest regards,

Stephen Sefick

On Tue, Feb 20, 2024, 12:24 James Powell  wrote:

>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.


Re: [R] Help with connection issue for R (just joined, leading R for our agency)

2020-12-14 Thread stephen sefick
Hello, I use ESS everyday for work. If you choose to explore this route,
spacemacs configuration files/layers may ease your transition to emacs.

Stephen Sefick, PhD

On Fri, Dec 11, 2020, 06:25 Jeremie Juste  wrote:

>
> Hello Alejandra,
>
> || On Tuesday,  8 Dec 2020 at 10:48, Alejandra Barrio Gorski wrote:
>
> Welcome to the mailing list.
> > Greetings, I am new to this list. I joined because I am pioneering the
> use
> > of R for the agency I work for. I essentially work alone and would like
> to
> > reach out for help on an issue I have been having. Here it is:
> Pioneering R is far from an easy task especially if you are doing it on
> your own. Hat for raising up to the challenge!
>
> This is mailing list is dedicated to R usage and I'm afraid you won't
> find a lot of help regarding the working of R-Studio here.
>
> || On Wednesday,  9 Dec 2020 at 10:35, Martin Maechler wrote:
> > Also, yes indeed, government (or company) firewalls *do* lead
> > to problems which are sometimes much more prominent when using R
> > via Rstudio, rather than using R "alone" (or via ESS which I use
> > 99% of the time, "Emacs Speaks Statistics").
>
> That said, I take the opportunity Martin gave me to advertise that both
> Emacs and  Emacs Speaks Statistics works on Windows as well. The entry
> cost might seem
> expensive in the beginning but I assure you it will pay very quickly.
>
> - For emacs
>- https://www.gnu.org/software/emacs/tour/
>- https://www.youtube.com/watch?v=Iagbv974GlQ
>- emacs mailing-list help-gnu-em...@gnu.org
>
> - For ESS
>-  https://ess.r-project.org/
>-  ESS mailing list https://stat.ethz.ch/mailman/listinfo/ess-help
>
>
> Best regards,
> Jeremie
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.


Re: [R] Language environment

2020-11-17 Thread stephen sefick
Maybe in .Rprofile? Maybe in .first in .Rprofile?

Stephen Sefick, PhD

On Tue, Nov 17, 2020, 08:01 Steven Yen  wrote:

> In R, I was able to set the language environment by fixing the line
>
> in file "C:\Program Files\R\R-4.0.3\etc\Rconsole", line 70 below, set
> language to EN:
>
> language = EN
>
> In RStudio, I am not able to do that, except to include the line
>
> Sys.setenv(LANG="en");
>
> in every one of my program file. That's too much work. Any idea? Thank you!
>
>
>
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.


Re: [R] Simultaneous Equation Model with Dichotomous Dependent Variables

2020-10-05 Thread stephen sefick
Casey, I have used laavan for sem in the past.

Stephen Sefick, PhD

On Mon, Oct 5, 2020, 02:12 Casey Mallon  wrote:

> Hello everyone!
>
> I am currently working with a time series panel data set measuring six
> dependent variables:
> 4 of which are binary and 2 of which are count data.
>
> I am interested in constructing a model to measure if the dependent
> variables influence one another.
>
> For example: DV1~ DV2 + IV1+IV2+ Controls and DV2~ DV1 + IV1+ IV2+ Controls
> (where IV stands for independent variable, not instrumental).
>
> My current code looks like:
> glm(DV1~ IV1+ Control1+ Control2+ DV4+ DV5+ DV6, family="binomial", data=
> data)
> which I repeat for each of the 6 DVs.
>
>
> I realize that I need to run a series of simultaneous equation models, but
> I am not having much luck figuring out how to run an SEM with binary data
> in R. The zelig package used to have a bivariate logit command, but zelig
> does not work with the most current version of R. Additionally, I would run
> into issues later on using that command since 2 of my variables are not
> binary.
>
> Any ideas? Thanks for your help!
>
> Casey
>
> ---
>
> Ph.D student, Political Science
>
> University of Chicago
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.


Re: [R] Reproducibility Between Local and Remote Computer with R

2020-08-09 Thread stephen sefick
Hi Kevin,

I think Abby has suggested something similar to what I think the problem is
related to - environment setup.

Some possible solutions:
The renv and packrat packages are a way to version your packages to help
with reproducability. Anaconda might be a solution for the R version and
package version problem, if installed on your hpc. Docker could work as
well (maybe the best option if installed). There are other workarounds, but
I would have to know how your particular hpc/compute environment is set up
to comment further.

Brass tacks:
I think you need to ensure all your package versions (R and add-on
packages) are the same.

Fwiw,

Stephen

On Sun, Aug 9, 2020, 08:26 Kevin Egan  wrote:

> Hi Stephen,
>
> I believe I am using Renv, but on my remote computer I am running batch
> files.
>
> Thanks,
>
> Kevin
>
> On 8 Aug 2020, at 18:18, stephen sefick  wrote:
>
> Caveat, I have only skimmed this email thread, so please forgive me if I
> have missed something.
>
> Are you able to use Renv, packrat, docker, or anaconda? Your compute
> environments are very different.
> Kindest regards,
>
> Stephen Sefick
>
> On Sat, Aug 8, 2020, 19:05 Abby Spurdle  wrote:
>
>> Hi Kevin,
>>
>> Intuitively, the first step would be to ensure that all versions of R,
>> and all the R packages, are the same.
>>
>> However, you mention HPC.
>> And the glmnet package imports the foreach package, which appears
>> (after a quick glance) to support multi-core and parallel computing.
>>
>> If your code uses parallel computing (?), you may need to look at how
>> random numbers, and related results, are handled...
>>
>>
>> On Sun, Aug 9, 2020 at 1:14 AM Kevin Egan  wrote:
>> >
>> > I posted this question:
>> >
>> > I am currently using R , RStudio , and a remote computer (using an R
>> script) to run the same code. I start by using set.seed(123) in all three
>> versions of the code, then using glmnet to assess a matrix. Ultimately, I
>> am having trouble reproducing the results between my local and the remote
>> computer's results. I am using R version 4.0.2 locally, and R version 3.6.0
>> remote.
>> >
>> > After running several tests, I'm wondering if there is a difference
>> between the two versions in R which may lead to slightly different
>> coefficients. If anyone has any insight I would appreciate it.
>> >
>> > Thanks.
>> >
>> > and found that there were slight differences between using rnorm with
>> R-4.0.2 and R-3.6.0 but did not find any differences for runif between both
>> systems. In my original code, I am using rnorm and was wondering if this
>> may be the reason I am finding slight differences in coefficients for
>> glmnet and lars testing between using my local computer (R-4.0.2) and my
>> remote computer (R-3.6.0). I am running my code locally on a MacOSX and
>> remote on what I believe is an HPC.
>> >
>> > Thanks.
>> > [[alternative HTML version deleted]]
>> >
>> > __
>> > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> > https://stat.ethz.ch/mailman/listinfo/r-help
>> > PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> <http://www.r-project.org/posting-guide.html>
>> > and provide commented, minimal, self-contained, reproducible code.
>>
>> __
>> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> <http://www.r-project.org/posting-guide.html>
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.


Re: [R] Reproducibility Between Local and Remote Computer with R

2020-08-08 Thread stephen sefick
Caveat, I have only skimmed this email thread, so please forgive me if I
have missed something.

Are you able to use Renv, packrat, docker, or anaconda? Your compute
environments are very different.
Kindest regards,

Stephen Sefick

On Sat, Aug 8, 2020, 19:05 Abby Spurdle  wrote:

> Hi Kevin,
>
> Intuitively, the first step would be to ensure that all versions of R,
> and all the R packages, are the same.
>
> However, you mention HPC.
> And the glmnet package imports the foreach package, which appears
> (after a quick glance) to support multi-core and parallel computing.
>
> If your code uses parallel computing (?), you may need to look at how
> random numbers, and related results, are handled...
>
>
> On Sun, Aug 9, 2020 at 1:14 AM Kevin Egan  wrote:
> >
> > I posted this question:
> >
> > I am currently using R , RStudio , and a remote computer (using an R
> script) to run the same code. I start by using set.seed(123) in all three
> versions of the code, then using glmnet to assess a matrix. Ultimately, I
> am having trouble reproducing the results between my local and the remote
> computer's results. I am using R version 4.0.2 locally, and R version 3.6.0
> remote.
> >
> > After running several tests, I'm wondering if there is a difference
> between the two versions in R which may lead to slightly different
> coefficients. If anyone has any insight I would appreciate it.
> >
> > Thanks.
> >
> > and found that there were slight differences between using rnorm with
> R-4.0.2 and R-3.6.0 but did not find any differences for runif between both
> systems. In my original code, I am using rnorm and was wondering if this
> may be the reason I am finding slight differences in coefficients for
> glmnet and lars testing between using my local computer (R-4.0.2) and my
> remote computer (R-3.6.0). I am running my code locally on a MacOSX and
> remote on what I believe is an HPC.
> >
> > Thanks.
> > [[alternative HTML version deleted]]
> >
> > __
> > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > 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, reproducible code.
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.


Re: [R] National Weather Service Data

2020-07-02 Thread stephen sefick
I am unfamiliar with Rnomads. Could you provide a minimal reproducable
example? You are more likely to receive help this way.

On Thu, Jul 2, 2020, 18:06 Philip  wrote:

> Is anyone out there familiar with rNOMADS?  It is a package to get into
> National Weather Service forecasting data with R?
>
> I'm not sure the Weather Service software named wgrib2 loaded correctly
> because some of the stuff won't run and I can't make much sense out of some
> of the output.
>
> Thanks.
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.


Re: [R] Posting: R-Project Code/Package for a Stepwise Multiple Regression Analysis

2020-03-30 Thread stephen sefick
Please search archives and Google. There are many resources. I think that
the MASS package has stepwise regression, but please confirm yourself.

On Mon, Mar 30, 2020, 09:45 Jastine bugayong  wrote:

> Statistics newbie over here getting her feet wet into the research realm.
>
> I will be using the R-project to analyze the predictability of some data
> using a stepwise multiple regression analysis. I would also like to have a
> forced entry method option to avoid any methodology flaws, if possible,
> too. Is there any existing R code or r-project add-on packages for this?
>
> Details: 2 or more dependent variables, 5 or more independent variables.
> These variables will be in the form of numbers such as age, height, etc.
> There will be 2 steps. I am happy to provide any additional details for you
> to better understand my situation as well.
>
> Thank you in advance for your help! I'm open to any insights you have.
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.


Re: [R] R unable to locate base unix commands (tar, sh etc)

2019-10-17 Thread stephen sefick
I work on a Mac now. I believe .profile gets sourced first and then
.bashrc. I set PATH in my .bashrc. I set a git token in .Renviron and a
blank .Rprofile because I use packrat quite often. I have no problem with
my environment at a shell or in Rstudio.

I would start by commenting where you set the PATH in the multiple files
until you find the order they are sourced. Or look in .profile and .bashrc
to find and replace the semi colons with colons?

I do not understand how a PATH variable would be set in .Rprofile.

I agree with pd about the semicolons.

What happens when you type tar at a command prompt?
FWIW,

Stephen

On Thu, Oct 17, 2019, 20:13 peter dalgaard  wrote:

> Semicolons in PATH on a Unix derivative like MacOS could well do that to
> you. It is not clear how they got there, but apparently not from your
> ~/.Environ file. However, multiple settings of the same PATH variable in
> .Environment is not something I'd think would work. Persumably the last
> setting wins, but I'm not sure of that.
>
> -pd
>
> > On 15 Oct 2019, at 15:09 , gordon beattie  wrote:
> >
> > Started having a problem installing packages where R can't find base
> unix commands. I've put an example below (other packages have identical
> "command not found" errors, sometimes with different commands e.g. sh) and
> my PATH/.Renviron(where the problem likely is). I'm on MacOS. Thanks in
> advance for any assistance!
> >
> >> install.packages("hdf5r",
> configure.args="--with-hdf5=/usr/local/Cellar/hdf5/1.10.5_1/bin/h5cc")
> > trying URL '
> https://www.stats.bris.ac.uk/R/bin/macosx/el-capitan/contrib/3.6/hdf5r_1.3.0.tgz
> '
> > Content type 'application/x-gzip' length 4332333 bytes (4.1 MB)
> > ==
> > downloaded 4.1 MB
> >
> > sh: tar: command not found
> > Error: file
> �/var/folders/ll/jmydhb6n7jqg5rv_c58jxkkhgn/T//RtmpnssBh2/downloaded_packages/hdf5r_1.3.0.tgz�
> is not a macOS binary package
> > In addition: Warning messages:
> > 1: In system(paste0("tar zxf \"", path.expand(what), "\" -C \"",
> path.expand(where),  :
> >  error in running command
> > 2: 'tar' returned non-zero exit code 127
> >
> > PATH:
> >
> >> Sys.getenv("PATH")
> > [1] "/bin;/usr/bin;/usr/local/bin"
> >
> > .Renviron (could anyone explain why "Sys.getenv" doesn't output the
> contents of Renviron, trying to understand how they link)
> >
> > .RenvironR_LIBS=~/R/library
> > PAGER=/usr/local/bin/less
> > PATH=/Users/gordon.beattie/Downloads/R_packages/gliph-master/gliph/bin
> > PATH=/usr/local/bin
> > PATH=/usr/local/bin
> > PATH=/usr/bin
> > PATH=/bin
> > PATH=/usr/sbin
> > PATH=/sbin
> > PATH=/Users/gordon.beattie/.virtualenvs/r-reticulate/bin
> > PATH=/Users/gordon.beattie/.virtualenvs/r-reticulate/bin
> > PATH=/usr/bin:/bin:/usr/sbin
> > PATH=/sbin
> > PATH=/usr/local/bin
> >
> >
> >   [[alternative HTML version deleted]]
> >
> > __
> > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > 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, reproducible code.
>
> --
> Peter Dalgaard, Professor,
> Center for Statistics, Copenhagen Business School
> Solbjerg Plads 3, 2000 Frederiksberg, Denmark
> Phone: (+45)38153501
> Office: A 4.23
> Email: pd@cbs.dk  Priv: pda...@gmail.com
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.


Re: [R] Include pre-existing PDF files as vignettes in an R package?

2018-02-19 Thread stephen sefick
Yes, 'C-c C-e l l' I think, but follow the pop-up, and everything should be
ok.

On Feb 19, 2018 07:05, "Rainer Krug"  wrote:

>
>
> > On 19 Feb 2018, at 12:25, Duncan Murdoch  > wrote:
> >
> > On 19/02/2018 5:47 AM, Michael Hannon wrote:
> >> Thanks, Duncan.  The files in question are Emacs Org-mode files, and I
> >> think these are more or less isomorphic to Rmd files, but I haven't
> >> used Org-mode in a long time, so I think the mapping (Org-mode ==>
> >> Rmd) would be painful.
>
> That should be easy - you can export org-mode files directly to LaTex. I
> haven’t used org-mode for some time, but I think it is Ctrl - C - E and
> than follow the prompts (obviously in emacs).
>
> Rainer
>
>
> >
> > If they aren't LaTeX then they won't be able to masquerade as Sweave
> files, so things are more complicated.
> >
> > I think there are two possibilities.  The better but harder one is to
> write your own "vignette engine".  Section 1.4.2 of the manual describes
> the process, and ?tools::vignetteEngine describes what is needed in your
> engine.
> >
> > The other possibility is to manually edit an inst/doc/index.html file to
> include links to your documents.  They won't be treated as vignettes, but
> at least users will be able to find them.  The other disadvantage of this
> approach is that you'll need to edit it for all vignettes, not just the
> strange ones.
> >
> > Duncan Murdoch
> >
> >
> >> -- Mike
> >> On Mon, Feb 19, 2018 at 1:20 AM, Duncan Murdoch
> >> > wrote:
> >>> On 18/02/2018 9:06 PM, Michael Hannon wrote:
> 
>  Greetings.  The group that I work with has just started using the
> approach
>  outlined in Karl Broman's handy primer:
> 
>   http://kbroman.org/pkg_primer/pages/vignettes.html <
> http://kbroman.org/pkg_primer/pages/vignettes.html>
> 
>  to create vignettes for a couple of R packages.
> 
>  This works fine as long as we have a current Rmd version of the
> vignette.
>  But
>  we have some old PDF documents that we'd like to include as vignettes
> as
>  well.
>  I'd like to know if there's a way to include such PDF files as
> vignettes.
> 
>  We *do* have the source files for the PDF files in question, but it
> would
>  be
>  tedious to convert those source files to Rmd format.
> 
>  My first thought was simply to add the PDF files to the .../vignettes
>  subdirectory and run the devtools::build_vignettes() function
> (mentioned
>  in
>  the Broman tutorial), but that doesn't work.  I.e., the PDF files
> don't
>  appear
>  in the list of vignettes for the package.
> 
>  And after running devtools::build_vignettes I see that there's a lot
> of
>  additional stuff in:
> 
>   ...lib/R/site-library//...
> 
>  so I don't see any obvious way to "fool" R into using the PDF files
> that
>  haven't gone through the whole knitr/rmarkdown process.  (Not to
> mention
>  that
>  such an approach would be fragile at best.)
> >>>
> >>>
> >>> You don't say what format the source is, but if it is LaTeX, you just
> need
> >>> to add some comments at the beginning, rename ending in .Rnw, and R
> will
> >>> recognize plain LaTeX files as Sweave vignettes.
> >>>
> >>> See the Writing R Extensions manual, section 1.4.
> >>>
> >>> Duncan Murdoch
> >>>
> 
>  Suggestions welcome.  Thanks.
> 
>  -- Mike
> 
>  __
>  R-help@r-project.org  mailing list --
> To UNSUBSCRIBE and more, see
>  https://stat.ethz.ch/mailman/listinfo/r-help <
> 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, reproducible code.
> 
> >>>
> >
> > __
> > R-help@r-project.org  mailing list -- To
> UNSUBSCRIBE and more, see
> > https://stat.ethz.ch/mailman/listinfo/r-help <
> 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, reproducible code.
>
> --
> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
> Biology, UCT), Dipl. Phys. (Germany)
>
> University of Zürich
>
> Cell:   +41 (0)78 630 66 57
> email:  rai...@krugs.de 
> Skype:  RMkrug
>
> PGP: 0x0F52F982
>
>
>
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/
> posting-guide.html
> and 

Re: [R] pulling recessions out of a hydrograph

2018-02-05 Thread stephen sefick
I have done this. I would use zoo for the time series part, and I think I
wrote a function using the min max after a period to locate the peak, go to
the peak, and calculate the slope 4 hours afterward. If I can locate the
code I don't mind sharing, but it is buried on my PhD machine.

On Feb 5, 2018 12:04 PM, "Janet Choate"  wrote:

> Dear R community,
>
> I'm hoping someone out there has perhaps done this and can share their code
> and/or expertise with me.
>
> I need to pull recession periods out of a hydrograph - can anyone help me
> with this?
> I want to create a subset from streamflow data that consists of just the
> recession curves - the decreasing runoff after the passage of a peak flow.
>
> would really appreciate any help on this!
> Janet
> --
> Tague Team Lab Manager
> 1005 Bren Hall
> UCSB, Santa Barbara, CA.
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.


[R] S4 Question; show generic method

2017-05-18 Thread stephen sefick
Hello,

I changed the name of a function, and updated my R packages with
update.packages(ask=FALSE), and I have had a curious (to me) change in show
method. I am developing a package, and a generic show method I defined for
my S4 class is not autocalled when I type the object name - object_name;
however, the show(object_name) works as expected. I have included the
output from sessionInfo():

R version 3.3.2 (2016-10-31)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

locale:
 [1] LC_CTYPE=en_US.utf8   LC_NUMERIC=C
 [3] LC_TIME=en_US.utf8LC_COLLATE=en_US.utf8
 [5] LC_MONETARY=en_US.utf8LC_MESSAGES=en_US.utf8
 [7] LC_PAPER=en_US.utf8   LC_NAME=C
 [9] LC_ADDRESS=C  LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.utf8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base

other attached packages:
[1] genotypeR_0.0.0.9000 ggplot2_2.2.1

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.10 lattice_0.20-35  zoo_1.8-0MASS_7.3-47
 [5] grid_3.3.2   plyr_1.8.4   gtable_0.2.0 magrittr_1.5
 [9] scales_0.4.1 stringi_1.1.5rlang_0.1.1  reshape2_1.4.2
[13] lazyeval_0.2.0   doBy_4.5-15  Matrix_1.2-10tools_3.3.2
[17] stringr_1.2.0munsell_0.4.3colorspace_1.3-2 tibble_1.3.1

I appreciate any help with this problem.
kindest regards,

Stephen

-- 
Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

"A big computer, a complex algorithm and a long time does not equal
science."

  -Robert Gentleman

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.


Re: [R] colorspace namespace problem with R CMD check --as-cran

2017-04-13 Thread stephen sefick
For those interested, I fixed this problem by adding LazyLoad: yes to the
DESCRIPTION file (I overlooked this because LazyData was there). I found
the answer in this exchange between Dr. Ripley and Wickham (
http://r.789695.n4.nabble.com/checking-whether-the-name-space-can-be-loaded-with-stated-dependencies-td918313.html#a918314
).

Thanks for the help.
kindest regards,

Stephen Sefick

On Tue, Apr 11, 2017 at 6:26 PM, stephen sefick <ssef...@gmail.com> wrote:

> Here is the relevant snippett from devtools::check() logs. I searched
> every file in pkg/R, and there is no call to plot.index (or plot at all).
>
> Warning: namespace ‘colorspace’ is not available and has been replaced
> by .GlobalEnv when processing object ‘plot.index’
> Warning: namespace ‘colorspace’ is not available and has been replaced
> by .GlobalEnv when processing object ‘plot.index’
>
>
> On Tue, Apr 11, 2017 at 5:15 PM, William Dunlap <wdun...@tibco.com> wrote:
>
>> Does one of the objects in pkg/data (or pkg/R) include a function made
>> by one of the functions in package:colorspace?  Such a function would
>> have the environment getNamespace("colorspace").
>> Bill Dunlap
>> TIBCO Software
>> wdunlap tibco.com
>>
>>
>> On Tue, Apr 11, 2017 at 2:47 PM, stephen sefick <ssef...@gmail.com>
>> wrote:
>> > I am at a loss. I do not know how to make this reproducible without
>> > providing the package sourced. I am receiving a warning when issuing
>> >
>> > R --vanilla CMD check --as-cran --no-restore
>> >
>> > The description file has
>> > Imports: methods, reshape2, plyr, doBy, zoo
>> >
>> > this is in 00install.out
>> > ** R
>> > ** data
>> > *** moving datasets to lazyload DB
>> > ** inst
>> > ** preparing package for lazy loading
>> > Warning: namespace ‘colorspace’ is not available and has been replaced
>> > by .GlobalEnv when processing object ‘plot.index’
>> > Warning: namespace ‘colorspace’ is not available and has been replaced
>> > by .GlobalEnv when processing object ‘plot.index’
>> > ** help
>> > *** installing help indices
>> > ** building package indices
>> > ** testing if installed package can be loaded
>> >
>> >
>> > Thank you for any help in advance.
>> > kindest regards,
>> >
>> > Stephen Sefick
>> >
>> > --
>> > Let's not spend our time and resources thinking about things that are so
>> > little or so large that all they really do for us is puff us up and
>> make us
>> > feel like gods.  We are mammals, and have not exhausted the annoying
>> little
>> > problems of being mammals.
>> >
>> > -K. Mullis
>> >
>> > "A big computer, a complex algorithm and a long time does not equal
>> > science."
>> >
>> >   -Robert Gentleman
>> >
>> > [[alternative HTML version deleted]]
>> >
>> > __
>> > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> > https://stat.ethz.ch/mailman/listinfo/r-help
>> > PLEASE do read the posting guide http://www.R-project.org/posti
>> ng-guide.html
>> > and provide commented, minimal, self-contained, reproducible code.
>>
>
>
>
> --
> Let's not spend our time and resources thinking about things that are so
> little or so large that all they really do for us is puff us up and make us
> feel like gods.  We are mammals, and have not exhausted the annoying little
> problems of being mammals.
>
> -K. Mullis
>
> "A big computer, a complex algorithm and a long time does not equal
> science."
>
>   -Robert Gentleman
>
>


-- 
Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

"A big computer, a complex algorithm and a long time does not equal
science."

  -Robert Gentleman

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.

Re: [R] colorspace namespace problem with R CMD check --as-cran

2017-04-11 Thread stephen sefick
Here is the relevant snippett from devtools::check() logs. I searched every
file in pkg/R, and there is no call to plot.index (or plot at all).

Warning: namespace ‘colorspace’ is not available and has been replaced
by .GlobalEnv when processing object ‘plot.index’
Warning: namespace ‘colorspace’ is not available and has been replaced
by .GlobalEnv when processing object ‘plot.index’


On Tue, Apr 11, 2017 at 5:15 PM, William Dunlap <wdun...@tibco.com> wrote:

> Does one of the objects in pkg/data (or pkg/R) include a function made
> by one of the functions in package:colorspace?  Such a function would
> have the environment getNamespace("colorspace").
> Bill Dunlap
> TIBCO Software
> wdunlap tibco.com
>
>
> On Tue, Apr 11, 2017 at 2:47 PM, stephen sefick <ssef...@gmail.com> wrote:
> > I am at a loss. I do not know how to make this reproducible without
> > providing the package sourced. I am receiving a warning when issuing
> >
> > R --vanilla CMD check --as-cran --no-restore
> >
> > The description file has
> > Imports: methods, reshape2, plyr, doBy, zoo
> >
> > this is in 00install.out
> > ** R
> > ** data
> > *** moving datasets to lazyload DB
> > ** inst
> > ** preparing package for lazy loading
> > Warning: namespace ‘colorspace’ is not available and has been replaced
> > by .GlobalEnv when processing object ‘plot.index’
> > Warning: namespace ‘colorspace’ is not available and has been replaced
> > by .GlobalEnv when processing object ‘plot.index’
> > ** help
> > *** installing help indices
> > ** building package indices
> > ** testing if installed package can be loaded
> >
> >
> > Thank you for any help in advance.
> > kindest regards,
> >
> > Stephen Sefick
> >
> > --
> > Let's not spend our time and resources thinking about things that are so
> > little or so large that all they really do for us is puff us up and make
> us
> > feel like gods.  We are mammals, and have not exhausted the annoying
> little
> > problems of being mammals.
> >
> > -K. Mullis
> >
> > "A big computer, a complex algorithm and a long time does not equal
> > science."
> >
> >   -Robert Gentleman
> >
> > [[alternative HTML version deleted]]
> >
> > __
> > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > 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, reproducible code.
>



-- 
Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

"A big computer, a complex algorithm and a long time does not equal
science."

  -Robert Gentleman

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.

Re: [R] colorspace namespace problem with R CMD check --as-cran

2017-04-11 Thread stephen sefick
Thank you for the quick reply.

here is what I tried:
I used environment(fxn) to look at all of the functions and data in the
package. I all of the functions have the namespace of the package. The
generic functions have a namespace like . The data
loaded with data(pkg_data) have and environment of NULL.

colorspace is attached when the package is loaded. Is it possible that a
function that I am using from another package is causing this problem?

> sessionInfo()
R version 3.3.3 (2017-03-06)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: Scientific Linux 7.3 (Nitrogen)

locale:
 [1] LC_CTYPE=en_US.utf8   LC_NUMERIC=C
 [3] LC_TIME=en_US.utf8LC_COLLATE=en_US.utf8
 [5] LC_MONETARY=en_US.utf8LC_MESSAGES=en_US.utf8
 [7] LC_PAPER=en_US.utf8   LC_NAME=C
 [9] LC_ADDRESS=C  LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.utf8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base

other attached packages:
[1] genotypeR_0.0.0.9000

loaded via a namespace (and not attached):
 [1] zoo_1.7-14   colorspace_1.3-2 MASS_7.3-45  magrittr_1.5
 [5] plyr_1.8.4   Matrix_1.2-8 tools_3.3.3  reshape2_1.4.2
 [9] Rcpp_0.12.10 stringi_1.1.3grid_3.3.3   doBy_4.5-15
[13] stringr_1.2.0lattice_0.20-35

On Tue, Apr 11, 2017 at 5:15 PM, William Dunlap <wdun...@tibco.com> wrote:

> Does one of the objects in pkg/data (or pkg/R) include a function made
> by one of the functions in package:colorspace?  Such a function would
> have the environment getNamespace("colorspace").
> Bill Dunlap
> TIBCO Software
> wdunlap tibco.com
>
>
> On Tue, Apr 11, 2017 at 2:47 PM, stephen sefick <ssef...@gmail.com> wrote:
> > I am at a loss. I do not know how to make this reproducible without
> > providing the package sourced. I am receiving a warning when issuing
> >
> > R --vanilla CMD check --as-cran --no-restore
> >
> > The description file has
> > Imports: methods, reshape2, plyr, doBy, zoo
> >
> > this is in 00install.out
> > ** R
> > ** data
> > *** moving datasets to lazyload DB
> > ** inst
> > ** preparing package for lazy loading
> > Warning: namespace ‘colorspace’ is not available and has been replaced
> > by .GlobalEnv when processing object ‘plot.index’
> > Warning: namespace ‘colorspace’ is not available and has been replaced
> > by .GlobalEnv when processing object ‘plot.index’
> > ** help
> > *** installing help indices
> > ** building package indices
> > ** testing if installed package can be loaded
> >
> >
> > Thank you for any help in advance.
> > kindest regards,
> >
> > Stephen Sefick
> >
> > --
> > Let's not spend our time and resources thinking about things that are so
> > little or so large that all they really do for us is puff us up and make
> us
> > feel like gods.  We are mammals, and have not exhausted the annoying
> little
> > problems of being mammals.
> >
> > -K. Mullis
> >
> > "A big computer, a complex algorithm and a long time does not equal
> > science."
> >
> >   -Robert Gentleman
> >
> > [[alternative HTML version deleted]]
> >
> > __
> > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > 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, reproducible code.
>



-- 
Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

"A big computer, a complex algorithm and a long time does not equal
science."

  -Robert Gentleman

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.

[R] colorspace namespace problem with R CMD check --as-cran

2017-04-11 Thread stephen sefick
I am at a loss. I do not know how to make this reproducible without
providing the package sourced. I am receiving a warning when issuing

R --vanilla CMD check --as-cran --no-restore

The description file has
Imports: methods, reshape2, plyr, doBy, zoo

this is in 00install.out
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
Warning: namespace ‘colorspace’ is not available and has been replaced
by .GlobalEnv when processing object ‘plot.index’
Warning: namespace ‘colorspace’ is not available and has been replaced
by .GlobalEnv when processing object ‘plot.index’
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded


Thank you for any help in advance.
kindest regards,

Stephen Sefick

-- 
Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

"A big computer, a complex algorithm and a long time does not equal
science."

  -Robert Gentleman

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.

Re: [R] system call removes special characters from text output

2017-04-05 Thread stephen sefick
Don,

Thank you for your reply. I found no problems in the perl script, but I
found that I had inadvertently swapped file names in my call to system("
script.pl file1 file2") works as expected system(script.pl file2 file1)
produces the output that formed my original query.

Thanks so much, and I learned to not code after 10 PM.
kindest regards,

Stephen

On Wed, Apr 5, 2017 at 4:06 PM, MacQueen, Don <macque...@llnl.gov> wrote:

> I can't reproduce this.
>
> On my system, the contents of an executable file named tmp.pl:
>
> #! /opt/local/bin/perl
> print "[A/B]\n";
>
> At a shell prompt:
>
> [72]% ./tmp.pl
> [A/B]
>
> Inside R:
>
> > system(' ./tmp.pl')
> [A/B]
>
>
> --
> Don MacQueen
>
> Lawrence Livermore National Laboratory
> 7000 East Ave., L-627
> Livermore, CA 94550
> 925-423-1062
>
>
> On 4/3/17, 8:57 PM, "R-help on behalf of stephen sefick" <
> r-help-boun...@r-project.org on behalf of ssef...@gmail.com> wrote:
>
> Hello,
>
> I am writing an R package, and I am using system() to call a perl
> script.
> The output of the perl script is correct except for "[A/B]" is output
> as
> "AB". Can someone explain this behavior. I would like to try and fix
> this.
> many thanks,
>
> Stephen Sefick
>
> --
> Let's not spend our time and resources thinking about things that are
> so
> little or so large that all they really do for us is puff us up and
> make us
> feel like gods.  We are mammals, and have not exhausted the annoying
> little
> problems of being mammals.
>
> -K. Mullis
>
> "A big computer, a complex algorithm and a long time does not equal
> science."
>
>   -Robert Gentleman
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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, reproducible code.
>
>
>


-- 
Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

"A big computer, a complex algorithm and a long time does not equal
science."

  -Robert Gentleman

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.


Re: [R] system call removes special characters from text output

2017-04-04 Thread stephen sefick
Hello everyone,

Again, I apologize for not providing a reproducible example. There was a
small (but important) bug in my R code having nothing to do with system(),
this is now fixed, and everything is working as expected this morning. The
lesson for me is time to stop coding after 10 PM. Thank you for all of the
help.
kindest regards,

Stephen

On Tue, Apr 4, 2017 at 11:01 AM, Boris Steipe <boris.ste...@utoronto.ca>
wrote:

> The "whatever information" would be the usual minimal reproducible example.
>
> Since you think your code works at the shell level, make up an example
> with a system call to "echo".
> Then state what you expect to happen and what happens instead.
>
> B.
>
>
>
> > On Apr 4, 2017, at 12:44 AM, stephen sefick <ssef...@gmail.com> wrote:
> >
> > Hi Jeff,
> >
> > My apologies for not providing enough information. The perl code works as
> > expected at the shell (without calling it from R). I have tried the
> system
> > call inside of an ESS R session and at a the shell. Both of these produce
> > the unexpected result. I can provide whatever information that is needed.
> > kindest regards,
> >
> > Stephen
> >
> > On Mon, Apr 3, 2017 at 11:23 PM, Jeff Newmiller <
> jdnew...@dcn.davis.ca.us>
> > wrote:
> >
> >> Sorry, RPsychic package not found. Please install package reprex, apply
> it
> >> to your problem and try again. Note that if this problem can only be
> >> produced from within a package then there is an R-package-devel mailing
> >> list that would be a more appropriate place to ask. Also, if the
> problem is
> >> actually in the perl code or in the shell (this seems likely to me) then
> >> you probably need to look even further afield for help.
> >> --
> >> Sent from my phone. Please excuse my brevity.
> >>
> >> On April 3, 2017 8:57:07 PM PDT, stephen sefick <ssef...@gmail.com>
> wrote:
> >>> Hello,
> >>>
> >>> I am writing an R package, and I am using system() to call a perl
> >>> script.
> >>> The output of the perl script is correct except for "[A/B]" is output
> >>> as
> >>> "AB". Can someone explain this behavior. I would like to try and fix
> >>> this.
> >>> many thanks,
> >>>
> >>> Stephen Sefick
> >>
> >
> >
> >
> > --
> > Let's not spend our time and resources thinking about things that are so
> > little or so large that all they really do for us is puff us up and make
> us
> > feel like gods.  We are mammals, and have not exhausted the annoying
> little
> > problems of being mammals.
> >
> >-K. Mullis
> >
> > "A big computer, a complex algorithm and a long time does not equal
> > science."
> >
> >  -Robert Gentleman
> >
> >   [[alternative HTML version deleted]]
> >
> > __
> > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > 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, reproducible code.
>
>


-- 
Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

"A big computer, a complex algorithm and a long time does not equal
science."

  -Robert Gentleman

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.


Re: [R] system call removes special characters from text output

2017-04-03 Thread stephen sefick
Hi Jeff,

My apologies for not providing enough information. The perl code works as
expected at the shell (without calling it from R). I have tried the system
call inside of an ESS R session and at a the shell. Both of these produce
the unexpected result. I can provide whatever information that is needed.
kindest regards,

Stephen

On Mon, Apr 3, 2017 at 11:23 PM, Jeff Newmiller <jdnew...@dcn.davis.ca.us>
wrote:

> Sorry, RPsychic package not found. Please install package reprex, apply it
> to your problem and try again. Note that if this problem can only be
> produced from within a package then there is an R-package-devel mailing
> list that would be a more appropriate place to ask. Also, if the problem is
> actually in the perl code or in the shell (this seems likely to me) then
> you probably need to look even further afield for help.
> --
> Sent from my phone. Please excuse my brevity.
>
> On April 3, 2017 8:57:07 PM PDT, stephen sefick <ssef...@gmail.com> wrote:
> >Hello,
> >
> >I am writing an R package, and I am using system() to call a perl
> >script.
> >The output of the perl script is correct except for "[A/B]" is output
> >as
> >"AB". Can someone explain this behavior. I would like to try and fix
> >this.
> >many thanks,
> >
> >Stephen Sefick
>



-- 
Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

"A big computer, a complex algorithm and a long time does not equal
science."

  -Robert Gentleman

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.


[R] system call removes special characters from text output

2017-04-03 Thread stephen sefick
Hello,

I am writing an R package, and I am using system() to call a perl script.
The output of the perl script is correct except for "[A/B]" is output as
"AB". Can someone explain this behavior. I would like to try and fix this.
many thanks,

Stephen Sefick

-- 
Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

"A big computer, a complex algorithm and a long time does not equal
science."

  -Robert Gentleman

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.


Re: [R] Make sure a data frame has been "fun through" a function

2017-02-24 Thread stephen sefick
Update, I have decided to make use S4 in order to solve my problem. Are
there any particular resources that might be helpful. Thanks you for all of
the help.
kindest regards,

STephen

On Tue, Feb 21, 2017 at 10:52 AM, William Dunlap <wdun...@tibco.com> wrote:

> Stray attributes on data.frames may or may not survive some simple
> operations on the data.frame.  E.g.,
>
> > d <- data.frame(X=1:5, Y=log(1:5), G=factor(rep(c("a","b"),c(2,3
> > attr(d, "checked") <- TRUE
> > wasChecked <- function(x) isTRUE(attr(x, "checked"))
> > wasChecked(d)
> [1] TRUE
> > wasChecked(d[1:4,]) # select some rows
> [1] TRUE
> > wasChecked(d[,1:2]) # select some columns
> [1] FALSE
> > d[1,1] <- 10 # change a single value
> > wasChecked(d)
> [1] TRUE
> > d$NewColumn <- 11:15 # add a column
> > wasChecked(d)
> [1] TRUE
>
> I don't know if this would be an issue in your case.  If it is, you
> could subclass "data.frame" and define methods so that the operations
> of interest preserve or remove the attribute in the way that you
> desire.
>
> Bill Dunlap
> TIBCO Software
> wdunlap tibco.com
>
>
> On Tue, Feb 21, 2017 at 8:30 AM, Charles C. Berry <ccbe...@ucsd.edu>
> wrote:
> > On Tue, 21 Feb 2017, stephen sefick wrote:
> >
> >> Sorry for not being clear. I have never used S3 methods before. Below is
> >> some R code that sketches out my idea. Is this a sensible solution?
> >>
> >
> > Sure. See comments (untested) inline.
> >
> > Chuck
> >
> >> test_data <- data.frame(a=1:10, b=1:10, c=1:10)
> >>
> >> functionA <- function(x, impossible_genotype){
> >>##some data processing
> >>y <- x
> >>
> >>##return S3 to be able to use impossible genotype later
> >>class(y) <- append(class(y),"genotypes")
> >
> >
> >  class(y) <- c("genotypes",class(y))
> >
> >>
> >>attr(y, "impossible_genotype") <- impossible_genotype
> >>
> >>return(y)
> >> }
> >>
> >> test_data_genotypes <- functionA(test_data, impossible_genotype="Ref")
> >>
> >> functionB <- function(x){
> >>##stop if pre-processed with functionA
> >>if(sum(class(x)=="genotypes")!=1){stop("Need to pre-process data
> with
> >> functionA")}
> >
> >
> > if(!(inherits("genotypes")){
> > stop("Need to pre-process data with functionA")}
> >
> >
> > or in functionA you could skip the class()<- and just set the
> > "impossible_genotypes" attribute to FALSE when there are none such.
> >
> > Then here test
> >
> >  if (is.null(attr(x,"impossible_genotypes"))){
> > stop("Need to pre-process data with functionA")
> > } else {
> > return(alleles)
> > }
> >
> >
> >>
> >>##use this later in functionB to
> >>impossible_genotype <- attributes(x)$impossible_genotype
> >
> >
> >  impossible_genotype <- attr(x,"impossible_genotype")
> >>
> >>
> >>alleles <- c("Ref", "Alt")
> >>
> >>coded_genotype <- alleles[alleles!=impossible_genotype]
> >
> >
> >  maybe `!is.element(alleles,impossible_genotype)' is safer than `!='
> >
> >>
> >>
> >>
> >>return(coded_genotype)
> >> }
> >>
> >> ##stop if not pre-processed with functionA
> >> functionB(test_data)
> >>
> >> ##processed with functionA
> >> functionB(test_data_genotypes)
> >>
> >
> > __
> > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > 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, reproducible code.
>



-- 
Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

"A big computer, a complex algorithm and a long time does not equal
science."

  -Robert Gentleman

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.


Re: [R] Make sure a data frame has been "fun through" a function

2017-02-21 Thread stephen sefick
Sorry for not being clear. I have never used S3 methods before. Below is
some R code that sketches out my idea. Is this a sensible solution?

test_data <- data.frame(a=1:10, b=1:10, c=1:10)

functionA <- function(x, impossible_genotype){
##some data processing
y <- x

##return S3 to be able to use impossible genotype later
class(y) <- append(class(y),"genotypes")

attr(y, "impossible_genotype") <- impossible_genotype

return(y)
}

test_data_genotypes <- functionA(test_data, impossible_genotype="Ref")

functionB <- function(x){
##stop if pre-processed with functionA
if(sum(class(x)=="genotypes")!=1){stop("Need to pre-process data with
functionA")}

##use this later in functionB to
impossible_genotype <- attributes(x)$impossible_genotype

alleles <- c("Ref", "Alt")

coded_genotype <- alleles[alleles!=impossible_genotype]



return(coded_genotype)
}

##stop if not pre-processed with functionA
functionB(test_data)

##processed with functionA
functionB(test_data_genotypes)

On Tue, Feb 21, 2017 at 6:41 AM, David Winsemius <dwinsem...@comcast.net>
wrote:

>
> > On Feb 20, 2017, at 4:43 PM, stephen sefick <ssef...@gmail.com> wrote:
> >
> > Hello All,
> >
> > I am writing a package. I would like to encourage the user to look at the
> > data to rectify errors with function A before utilizing function B to
> code
> > these data as binary. I thought about solving this problem by adding a
> > "flag" in the attributes that could be used downstream in B, and have a
> > function that adds this "flag" if the user is convinced that everything
> is
> > okay. This would allow the user to utilize their data as is, if error
> > checking is not necessary. Maybe I am overthinking this. Thanks again.
> > kindest regards,
>
> Still not clear what is needed but there is an `attr<-` function. You
> might get waht you wnat by having function A add an attribute which is then
> checked by B.
>
> --
> David
> >
> > Stephen
> >
> > On Mon, Feb 20, 2017 at 6:24 PM, Charles C. Berry <ccbe...@ucsd.edu>
> wrote:
> >
> >> On Mon, 20 Feb 2017, stephen sefick wrote:
> >>
> >> Hello,
> >>>
> >>> I would like to add something to a data frame that is 1) invisible to
> the
> >>> user, 2) has no side effects, and 3) I can test for in a following
> >>> function. Is this possible? I am exploring classes and attributes and I
> >>> have thought about using a list (but 1 and 2 not satisfied). Any help
> >>> would
> >>> be greatly appreciated.
> >>>
> >>>
> >> Depends on exactly what you mean by `invisible' and `side effects'.
> >>
> >> You can do this (but I am not necessarily recommending this):
> >>
> >> add.stuff <- function(x,...){
> >>>
> >> + class(x)<- c("more.stuff",class(x))
> >> + attr(x,"stuff")<- list(...)
> >> + x}
> >>
> >>>
> >>>
> >> And printing and model functions will be unaffected:
> >>
> >> df <- data.frame(a=1:3,b=letters[1:3])
> >>> df2 <- add.stuff(df,comment="wow", length="3 rows")
> >>> df2
> >>>
> >>  a b
> >> 1 1 a
> >> 2 2 b
> >> 3 3 c
> >>
> >>> attr(df2,"stuff")
> >>>
> >> $comment
> >> [1] "wow"
> >>
> >> $length
> >> [1] "3 rows"
> >>
> >> all.equal(lm(a~b,df),lm(a~b,df2)) # only call should differ
> >>>
> >> [1] "Component “call”: target, current do not match when deparsed"
> >>
> >>>
> >>>
> >> And if you need some generics to take account of the "stuff" attribute,
> >> you can write the methods to do that.
> >>
> >> ---
> >>
> >> Another solution is to put your data.framne in a package and then have
> >> other objects hold the 'stuff' stuff. Once your package is loaded or
> >> imported, the user will have access to the data in a way that might be
> said
> >> to be `invisible' in ordinary usage.
> >>
> >> ---
> >>
> >> But seriously, you should say *why* you want to do this. There are
> >> probably excellent solutions that do not involve directly altering the
> >> data.frame and may not involve putting together a package.
> >>
> >> HTH,
> >

Re: [R] Make sure a data frame has been "fun through" a function

2017-02-20 Thread stephen sefick
Hello All,

I am writing a package. I would like to encourage the user to look at the
data to rectify errors with function A before utilizing function B to code
these data as binary. I thought about solving this problem by adding a
"flag" in the attributes that could be used downstream in B, and have a
function that adds this "flag" if the user is convinced that everything is
okay. This would allow the user to utilize their data as is, if error
checking is not necessary. Maybe I am overthinking this. Thanks again.
kindest regards,

Stephen

On Mon, Feb 20, 2017 at 6:24 PM, Charles C. Berry <ccbe...@ucsd.edu> wrote:

> On Mon, 20 Feb 2017, stephen sefick wrote:
>
> Hello,
>>
>> I would like to add something to a data frame that is 1) invisible to the
>> user, 2) has no side effects, and 3) I can test for in a following
>> function. Is this possible? I am exploring classes and attributes and I
>> have thought about using a list (but 1 and 2 not satisfied). Any help
>> would
>> be greatly appreciated.
>>
>>
> Depends on exactly what you mean by `invisible' and `side effects'.
>
> You can do this (but I am not necessarily recommending this):
>
> add.stuff <- function(x,...){
>>
> + class(x)<- c("more.stuff",class(x))
> + attr(x,"stuff")<- list(...)
> + x}
>
>>
>>
> And printing and model functions will be unaffected:
>
> df <- data.frame(a=1:3,b=letters[1:3])
>> df2 <- add.stuff(df,comment="wow", length="3 rows")
>> df2
>>
>   a b
> 1 1 a
> 2 2 b
> 3 3 c
>
>> attr(df2,"stuff")
>>
> $comment
> [1] "wow"
>
> $length
> [1] "3 rows"
>
> all.equal(lm(a~b,df),lm(a~b,df2)) # only call should differ
>>
> [1] "Component “call”: target, current do not match when deparsed"
>
>>
>>
> And if you need some generics to take account of the "stuff" attribute,
> you can write the methods to do that.
>
> ---
>
> Another solution is to put your data.framne in a package and then have
> other objects hold the 'stuff' stuff. Once your package is loaded or
> imported, the user will have access to the data in a way that might be said
> to be `invisible' in ordinary usage.
>
> ---
>
> But seriously, you should say *why* you want to do this. There are
> probably excellent solutions that do not involve directly altering the
> data.frame and may not involve putting together a package.
>
> HTH,
>
> Chuck




-- 
Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

"A big computer, a complex algorithm and a long time does not equal
science."

  -Robert Gentleman

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.

Re: [R] Make sure a data frame has been "fun through" a function

2017-02-20 Thread stephen sefick
Just as clarification, I don't want to hide anything from the user. I just
want to add something that I can test for in downstream function. I
appreciate all of the help.
kindest regards,

Stephen

On Mon, Feb 20, 2017 at 5:53 PM, Bert Gunter <bgunter.4...@gmail.com> wrote:

> Yes.
>
> To elaborate a bit on Ista's reply:
>
> A)   The only way I can imagine hiding info from a user would be to
> encrypt it. This could be done programmatically I think, but I would have
> to research it to figure out how.
>
> B) If all you want to do is prevent the info from being printed, just
> create e.g  an S3 class of type "foo" that inherits from "data.frame" with
> your info as an attribute and provide a print.foo method that just prints
> the data frame without the attribute. Your function can access and use the
> attribute any way it likes.
>
> Cheers,
> Bert
>
>
> Bert
>
> On Feb 20, 2017 1:27 PM, "Ista Zahn" <istaz...@gmail.com> wrote:
>
> It depends on what you mean by 1). If you mean "won't annoy the user" then
> yes, e.g., add something to the class attribute. If 1) means "can't be
> discovered by the user" then no (at least not easily). Anything you can see
> they can see.
>
> Best,
> Ista
>
>
> On Feb 20, 2017 4:21 PM, "stephen sefick" <ssef...@gmail.com> wrote:
>
> Hello,
>
> I would like to add something to a data frame that is 1) invisible to the
> user, 2) has no side effects, and 3) I can test for in a following
> function. Is this possible? I am exploring classes and attributes and I
> have thought about using a list (but 1 and 2 not satisfied). Any help would
> be greatly appreciated.
>
> I did not provide a reproducible example because I see this as more of a R
> language question, but I will be happy to make a toy example if that would
> help.
>
> I appreciate all of the help.
>
> kindest regards,
>
> --
> Let's not spend our time and resources thinking about things that are so
> little or so large that all they really do for us is puff us up and make us
> feel like gods.  We are mammals, and have not exhausted the annoying little
> problems of being mammals.
>
> -K. Mullis
>
> "A big computer, a complex algorithm and a long time does not equal
> science."
>
>   -Robert Gentleman
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posti
> ng-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posti
> ng-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>
>


-- 
Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

"A big computer, a complex algorithm and a long time does not equal
science."

  -Robert Gentleman

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.


Re: [R] Make sure a data frame has been "fun through" a function

2017-02-20 Thread stephen sefick
Yes, I mean "won't annoy the user", will allow them to do anything they
need to do with a dataframe (write to csv, etc.), but will allow me to test
for in a down stream function of the analysis to stop the function and
present an error. Adding something to the class attribute seems like the
right thing to do. With my clarification do you think these seems like a
sensible thing to do? Thank you for all of the help.
kindest regards,

Stephen

On Mon, Feb 20, 2017 at 5:25 PM, Ista Zahn <istaz...@gmail.com> wrote:

> It depends on what you mean by 1). If you mean "won't annoy the user" then
> yes, e.g., add something to the class attribute. If 1) means "can't be
> discovered by the user" then no (at least not easily). Anything you can see
> they can see.
>
> Best,
> Ista
>
>
> On Feb 20, 2017 4:21 PM, "stephen sefick" <ssef...@gmail.com> wrote:
>
> Hello,
>
> I would like to add something to a data frame that is 1) invisible to the
> user, 2) has no side effects, and 3) I can test for in a following
> function. Is this possible? I am exploring classes and attributes and I
> have thought about using a list (but 1 and 2 not satisfied). Any help would
> be greatly appreciated.
>
> I did not provide a reproducible example because I see this as more of a R
> language question, but I will be happy to make a toy example if that would
> help.
>
> I appreciate all of the help.
>
> kindest regards,
>
> --
> Let's not spend our time and resources thinking about things that are so
> little or so large that all they really do for us is puff us up and make us
> feel like gods.  We are mammals, and have not exhausted the annoying little
> problems of being mammals.
>
> -K. Mullis
>
> "A big computer, a complex algorithm and a long time does not equal
> science."
>
>   -Robert Gentleman
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posti
> ng-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>
>


-- 
Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

"A big computer, a complex algorithm and a long time does not equal
science."

  -Robert Gentleman

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.


[R] Make sure a data frame has been "fun through" a function

2017-02-20 Thread stephen sefick
Hello,

I would like to add something to a data frame that is 1) invisible to the
user, 2) has no side effects, and 3) I can test for in a following
function. Is this possible? I am exploring classes and attributes and I
have thought about using a list (but 1 and 2 not satisfied). Any help would
be greatly appreciated.

I did not provide a reproducible example because I see this as more of a R
language question, but I will be happy to make a toy example if that would
help.

I appreciate all of the help.

kindest regards,

-- 
Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

"A big computer, a complex algorithm and a long time does not equal
science."

  -Robert Gentleman

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.


[ESS] R markdown/sweave emacs 24.3.1

2017-01-25 Thread Stephen Sefick
Hi,


I am new to kniter/sweave/Rmarkdown, but LOVE ESS. I would rather not go back 
to Rstudio to have the possibility of generating reports. I want the simplest 
setup possible for pdf and beamer output.


I am not having good luck with google. Can anyone point me in the right 
direction?

many thanks,


Stephen Sefick

[[alternative HTML version deleted]]

__
ESS-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help


[ESS] file completion R script buffer not auto completing

2016-12-14 Thread Stephen Sefick
Hello:

Long time R user; new ESS user. Thank you all so much for this wonderful
IDE. I am having problems with the ESS and the R script buffer.

I would like to be able to use an autocomplete file name/path like in R
studio. I am sure that I am missing something in my .emacs file. Please
let me know what things would be helpful to post in order to diagnose my
problem.

I appreciate the help.
kindest regards,

Stephen

__
ESS-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help


Re: [R] Melt and compute Max, Mean, Min

2016-11-18 Thread Stephen Sefick

Milu,

I am unsure what you are trying to do. Please provide a minimal 
reproducible example, and someone will likely be able to help you with 
the R code. What have you tried so far?

kindest regards,

Stephen

On 11/18/2016 06:49 AM, Miluji Sb wrote:

Dear all,

I have 51 years of data (1960 - 2010) in csv format, where each file
represents one year of data. Below is what each file looks like.

These are temperature data by coordinates, my goal is to to compute max,
min, and mean by year for each of the coordinates and construct a panel
dataset. Any help will be appreciated, thank you!

Sincerely,

Milu

temp <- dput(head(df,5))
structure(list(ISO3 = structure(c(28L, 28L, 28L, NA, 28L), .Label =
c("AFG",
"AGO", "ALB", "ARE", "ARG", "ARM", "AUS", "AUT", "AZE", "BDI",
"BEL", "BEN", "BFA", "BGD", "BGR", "BHS", "BIH", "BLR", "BLZ",
"BOL", "BRA", "BRN", "BTN", "BWA", "CAF", "CAN", "CHE", "CHL",
"CHN", "CIV", "CMR", "COD", "COG", "COL", "CRI", "CUB", "CYP",
"CZE", "DEU", "DJI", "DNK", "DOM", "DZA", "ECU", "EGY", "ERI",
"ESH", "ESP", "EST", "ETH", "FIN", "FJI", "FLK", "FRA", "GAB",
"GBR", "GEO", "GHA", "GIN", "GNB", "GNQ", "GRC", "GRL", "GTM",
"GUF", "GUY", "HND", "HRV", "HTI", "HUN", "IDN", "IND", "IRL",
"IRN", "IRQ", "ISL", "ISR", "ITA", "JAM", "JOR", "JPN", "KAZ",
"KEN", "KGZ", "KHM", "KIR", "KOR", "KWT", "LAO", "LBN", "LBR",
"LBY", "LCA", "LKA", "LSO", "LTU", "LUX", "LVA", "MAR", "MDA",
"MDG", "MEX", "MKD", "MLI", "MMR", "MNE", "MNG", "MOZ", "MRT",
"MWI", "MYS", "NAM", "NCL", "NER", "NGA", "NIC", "NLD", "NOR",
"NPL", "NZL", "OMN", "PAK", "PAN", "PER", "PHL", "PNG", "POL",
"PRI", "PRK", "PRT", "PRY", "QAT", "ROU", "RUS", "RWA", "SAU",
"SDN", "SEN", "SJM", "SLB", "SLE", "SLV", "SOM", "SRB", "SUR",
"SVK", "SVN", "SWE", "SWZ", "SYR", "TCD", "TGO", "THA", "TJK",
"TKM", "TLS", "TUN", "TUR", "TWN", "TZA", "UGA", "UKR", "URY",
"USA", "UZB", "VEN", "VNM", "VUT", "YEM", "ZAF", "ZMB", "ZWE"
), class = "factor"), lon = c(-69L, -68L, -72L, -71L, -70L),
 lat = c(-55L, -55L, -54L, -54L, -54L), day_1 = c(NA, NA,
 0, 0, 0), day_2 = c(NA, NA, 0, 0, 0), day_3 = c(NA, NA, 0,
 23.37984, 0), day_4 = c(NA, NA, 0, 0, 0), day_5 = c(NA, NA,
 0, 0, 0), day_6 = c(NA, NA, 0, 0, 0), day_7 = c(NA, NA, 2.83824,
 11.80116, 1.24956), day_8 = c(NA, NA, 0, 1.68588, 14.69448
 ), day_9 = c(NA, NA, 0, 0, 1.09296), day_10 = c(NA, NA, 0,
 0, 0), day_11 = c(NA, NA, 3.78, 3.7422, 0), day_12 = c(NA,
 NA, 0.54, 0, 0), day_13 = c(NA, NA, 0, 0, 0), day_14 = c(NA,
 NA, 0, 0, 0.39204), day_15 = c(NA, NA, 0, 0, 11.58732), day_16 = c(NA,
 NA, 0, 0, 0), day_17 = c(NA, NA, 0, 1.14048, 12.26448), day_18 = c(NA,
 NA, 0, 1.1934, 7.59024), day_19 = c(NA, NA, 9.74268, 0, 0
 ), day_20 = c(NA, NA, 0, 0, 0), day_21 = c(NA, NA, 1.96776,
 0, 0), day_22 = c(NA, NA, 0, 0, 0), day_23 = c(NA, NA, 0,
 0, 0), day_24 = c(NA, NA, 6.21756, 2.74752, 0), day_25 = c(NA,
 NA, 0, 0, 3.37932), day_26 = c(NA, NA, 4.8384, 0, 0), day_27 = c(NA,
 NA, 0, 0, 0), day_28 = c(NA, NA, 0, 0, 0), day_29 = c(NA,
 NA, 22.37328, 0, 0), day_30 = c(NA, NA, 28.97424, 11.25468,
 0), day_31 = c(NA, NA, 0, 0, 0), day_32 = c(NA, NA, 0, 0,
 2.00448), day_33 = c(NA, NA, 0, 0, 0), day_34 = c(NA, NA,
 0, 0, 0), day_35 = c(NA, NA, 0, 0, 0), day_36 = c(NA, NA,
 0, 0, 0), day_37 = c(NA, NA, 0, 0, 0), day_38 = c(NA, NA,
 32.7132, 31.71852, 0), day_39 = c(NA, NA, 0, 0, 5.84604),
 day_40 = c(NA, NA, 0, 0, 0), day_41 = c(NA, NA, 0, 0, 0),
 day_42 = c(NA, NA, 0, 0, 0), day_43 = c(NA, NA, 0, 0, 0),
 day_44 = c(NA, NA, 0, 0, 1.78416), day_45 = c(NA, NA, 0,
 0, 0), day_46 = c(NA, NA, 33.84504, 0, 0), day_47 = c(NA,
 NA, 0, 0, 0), day_48 = c(NA, NA, 0, 0, 0), day_49 = c(NA,
 NA, 0, 0, 0), day_50 = c(NA, NA, 0, 0.4752, 0), day_51 = c(NA,
 NA, 0, 0, 22.02012), day_52 = c(NA, NA, 0, 0, 0), day_53 = c(NA,
 NA, 0, 0, 3.48084), day_54 = c(NA, NA, 0, 0, 0), day_55 = c(NA,
 NA, 0.58212, 0, 0), day_56 = c(NA, NA, 0.35316, 0, 0), day_57 = c(NA,
 NA, 0, 0, 12.65436), day_58 = c(NA, NA, 0, 0, 0), day_59 = c(NA,
 NA, 0, 0, 0), day_60 = c(NA, NA, 3.03372, 22.05576, 0), day_61 = c(NA,
 NA, 2.5758, 0, 0), day_62 = c(NA, NA, 0, 0, 0), day_63 = c(NA,
 NA, 3.67416, 25.22016, 4.21524), day_64 = c(NA, NA, 0.52488,
 3.60288, 0), day_65 = c(NA, NA, 12.82608, 0, 0), day_66 = c(NA,
 NA, 0, 0, 0), day_67 = c(NA, NA, 0, 0, 0), day_68 = c(NA,
 NA, 0, 0, 0), day_69 = c(NA, NA, 0, 0, 0), day_70 = c(NA,
 NA, 1.11564, 5.17536, 0), day_71 = c(NA, NA, 1.18584, 0,
 0), day_72 = c(NA, NA, 0, 0, 0.10584), day_73 = c(NA, NA,
 0.62748, 14.39748, 7.50708), day_74 = c(NA, NA, 7.20252,
 20.02644, 1.07244), day_75 = c(NA, NA, 1.87488, 0, 0), day_76 = c(NA,
 NA, 0.26784, 0, 0), day_77 = c(NA, NA, 0, 0, 0), day_78 = c(NA,
 NA, 0, 0, 2.81664), day_79 = c(NA, NA, 0, 0, 0), day_80 = c(NA,
 NA, 0, 0, 0), day_81 = c(NA, NA, 0, 0, 0), day_82 = c(NA,
 NA, 1.29276, 0, 0), day_83 = c(NA, NA, 

[R] digital online identifier (doi) CRAN manual?

2016-09-09 Thread stephen sefick
Hello all,

I apologize if this is the incorrect forum for this query. I am a package
maintainer, and would like to have a doi for the package manual. What might
be a good way to go about this?
kindest regards,

Stephen Sefick

-- 
Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

"A big computer, a complex algorithm and a long time does not equal
science."

  -Robert Gentleman

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.


Re: [R] changing x and y ranges in a PCA plot created by library(labdsv)

2016-08-07 Thread stephen sefick
Can you provide code and data (with dput)? You will likely get an answer
more quickly.

On Sun, Aug 7, 2016 at 4:34 AM, Mohsen Sharafatmandrad <
mohsen.sharafatmand...@gmail.com> wrote:

> Hi,
>
> I want to change x and y ranges in a PCA plot created by library(labdsv).
> When I run "plot(o.pca, xlim=c(-2, 3), ylim=c(-2, 4))", nothing will
> change. I really appreciate if somebody can help on this.
>
> Cheers
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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, reproducible code.
>



-- 
Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

"A big computer, a complex algorithm and a long time does not equal
science."

  -Robert Gentleman

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.


[R] Rcpp on R 3.2.4 compile problem Linux

2016-06-21 Thread stephen sefick
I am trying to install Rcpp to a local library on an HPC. I am having
problems. I can provide any relevant information. Thank you in advance for
the help.

install.packages("Rcpp", repos=*)
*=a couple of different repos; all give the same errors

Relevant Cutout of errors (note I have replaced my home directory with
"HOME"):
Warning in file.copy(file.path(R.home("doc"), "html", "R.css"), outman) :
  problem copying /tools/R-3.2.4/lib64/R/doc/html/R.css to
/HOME/R/x86_64-pc-linux-gnu-library/3.2/Rcpp/html/R.css: No such file or
directory
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
  unable to load shared object
'/HOME/R/x86_64-pc-linux-gnu-library/3.2/Rcpp/libs/Rcpp.so':
  /HOME/R/x86_64-pc-linux-gnu-library/3.2/Rcpp/libs/Rcpp.so: undefined
symbol: _ZSt24__throw_out_of_range_fmtPKcz
Error: loading failed
Execution halted
ERROR: loading failed


Session Info:
R version 3.2.4 (2016-03-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS release 6.6 (Final)

locale:
 [1] LC_CTYPE=en_US.utf8   LC_NUMERIC=C
 [3] LC_TIME=en_US.utf8LC_COLLATE=en_US.utf8
 [5] LC_MONETARY=en_US.utf8LC_MESSAGES=en_US.utf8
 [7] LC_PAPER=en_US.utf8   LC_NAME=C
 [9] LC_ADDRESS=C  LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.utf8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base

loaded via a namespace (and not attached):
[1] tools_3.2.4

kindest regards,

-- 
Stephen Sefick, PhD
**
Auburn University
Biological Sciences
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

"A big computer, a complex algorithm and a long time does not equal
science."

  -Robert Gentleman

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.


Re: [R] FD package

2016-02-22 Thread stephen sefick
Demersal Marine, brackish, freshwater  3.323936 Invertebrate Feeder
>Browser
> com76 Demersal Marine, brackish, freshwater  3.201015 Invertebrate Feeder
>Browser
> com77 Demersal Marine, brackish, freshwater  3.280311 Invertebrate Feeder
>Browser
> com78 Demersal Marine, brackish, freshwater  3.318771 Invertebrate Feeder
>Browser
> com79 Demersal Marine, brackish, freshwater  3.318253 Invertebrate Feeder
>Browser
> com80 Demersal Marine, brackish, freshwater  3.374939 Invertebrate Feeder
>Browser
> com81 Demersal Marine, brackish, freshwater  3.440927 Invertebrate Feeder
>Browser
> com82 Demersal Marine, brackish, freshwater  3.381153 Invertebrate Feeder
>Browser
>  trait6
> com1  0.5 - 1.0
> com2  1.0 - 2.0
> com3  1.0 - 2.0
> com4  1.0 - 2.0
> com5  1.0 - 2.0
> com6  1.0 - 2.0
> com7  1.0 - 2.0
> com8  1.0 - 2.0
> com9  0.5 - 1.0
> com10 1.0 - 2.0
> com11 1.0 - 2.0
> com12 1.0 - 2.0
> com13 0.5 - 1.0
> com14 0.5 - 1.0
> com15 0.5 - 1.0
> com16 0.5 - 1.0
> com17 1.0 - 2.0
> com18 0.5 - 1.0
> com19 0.5 - 1.0
> com20 0.5 - 1.0
> com21 0.5 - 1.0
> com22 0.5 - 1.0
> com23 1.0 - 2.0
> com24 1.0 - 2.0
> com25 1.0 - 2.0
> com26 1.0 - 2.0
> com27 1.0 - 2.0
> com28 0.5 - 1.0
> com29 0.5 - 1.0
> com30 0.5 - 1.0
> com31 0.5 - 1.0
> com32 0.5 - 1.0
> com33 0.5 - 1.0
> com34 1.0 - 2.0
> com35 0.5 - 1.0
> com36 0.5 - 1.0
> com37 1.0 - 2.0
> com38 0.5 - 1.0
> com39 0.5 - 1.0
> com40 0.5 - 1.0
> com41 0.5 - 1.0
> com42 1.0 - 2.0
> com43 1.0 - 2.0
> com44 1.0 - 2.0
> com45 < 0.5
> com46 < 0.5
> com47 < 0.5
> com48 < 0.5
> com49 < 0.5
> com50 < 0.5
> com51 < 0.5
> com52 0.5 - 1.0
> com53 0.5 - 1.0
> com54 < 0.5
> com55 < 0.5
> com56 < 0.5
> com57 < 0.5
> com58 < 0.5
> com59 0.5 - 1.0
> com60 0.5 - 1.0
> com61 1.0 - 2.0
> com62 1.0 - 2.0
> com63 0.5 - 1.0
> com64 0.5 - 1.0
> com65 0.5 - 1.0
> com66 0.5 - 1.0
> com67 0.5 - 1.0
> com68 0.5 - 1.0
> com69 0.5 - 1.0
> com70 0.5 - 1.0
> com71 < 0.5
> com72 < 0.5
> com73 < 0.5
> com74 1.0 - 2.0
> com75 0.5 - 1.0
> com76 0.5 - 1.0
> com77 1.0 - 2.0
> com78 0.5 - 1.0
> com79 0.5 - 1.0
> com80 1.0 - 2.0
> com81 1.0 - 2.0
> com82 1.0 - 2.0
>
> 2016-02-22 13:58 GMT+00:00 stephen sefick <ssef...@gmail.com>:
>
>> If memory serves me, dbFD returns a lot of output. What do you want to
>> plot? Also, please provide reproducible examples, so that we can help you
>> solve your R related queries.
>> kindest regards,
>>
>> Stephen
>>
>> On Mon, Feb 22, 2016 at 7:00 AM, Fabio Monteiro <
>> fabio.monteiro1...@gmail.com> wrote:
>>
>>> Hi
>>>
>>> thank you for your quick answer
>>>
>>> I finally managed to insert everything correctly and dbFD is caltulated.
>>>
>>> I'm now trying to plot the results.
>>>
>>> My objects are matrices.
>>>
>>> x is a functional trait and species matrice. a is the species and samples
>>>
>>> Thank you
>>>
>>> 2016-02-22 12:19 GMT+00:00 PIKAL Petr <petr.pi...@precheza.cz>:
>>>
>>> > Hi
>>> >
>>> > comments inline
>>> >
>>> > > -Original Message-
>>> > > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of
>>> Fabio
>>> > > Monteiro
>>> > > Sent: Monday, February 22, 2016 11:51 AM
>>> > > To: r-help@r-project.org
>>> > > Subject: [R] FD package
>>> > >
>>> > > Hi.
>>> > >
>>> > > First i would like to say that i'm really new in R. I recently
>>> started
>>> > > working with R and i'm using the FD package.
>>> > >
>>> > > I'm having some errors that doesn't make any sense.
>>> > >
>>> > > I have 2 matrix, one is the species with functional traits and the
>>> > > second one is the species and abundances.
>>> >
>>> > Your objects are matrices or data frames? From docs dbFD expects
>>> various
>>> > inputs byt they have to be properly formatted.
>>> >
>>> > >
>>> > > When I try to run the dbFD to calculate the functional diversity, the
>>> > > error is the number of species is different in x and a.
>>> > >
>>> > > I checked a lot of times a

Re: [R] FD package

2016-02-22 Thread stephen sefick
s
> > sender. Delete the contents of this e-mail with all attachments and its
> > copies from your system.
> > If you are not the intended recipient of this e-mail, you are not
> > authorized to use, disseminate, copy or disclose this e-mail in any
> manner.
> > The sender of this e-mail shall not be liable for any possible damage
> > caused by modifications of the e-mail or by delay with transfer of the
> > email.
> >
> > In case that this e-mail forms part of business dealings:
> > - the sender reserves the right to end negotiations about entering into a
> > contract in any time, for any reason, and without stating any reasoning.
> > - if the e-mail contains an offer, the recipient is entitled to
> > immediately accept such offer; The sender of this e-mail (offer) excludes
> > any acceptance of the offer on the part of the recipient containing any
> > amendment or variation.
> > - the sender insists on that the respective contract is concluded only
> > upon an express mutual agreement on all its aspects.
> > - the sender of this e-mail informs that he/she is not authorized to
> enter
> > into any contracts on behalf of the company except for cases in which
> > he/she is expressly authorized to do so in writing, and such
> authorization
> > or power of attorney is submitted to the recipient or the person
> > represented by the recipient, or the existence of such authorization is
> > known to the recipient of the person represented by the recipient.
> >
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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, reproducible code.




-- 
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

"A big computer, a complex algorithm and a long time does not equal
science."

  -Robert Gentleman

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.

Re: [R] Alternatives for explicit for() loops

2015-11-06 Thread stephen sefick
ng the incomb function within the loop instead of
> >> defining it outside the loop?  Also you are referencing several
> variables
> >> that are global (e.g., m & j); you should be passing these in as
> parameters
> >> to the function.
> >>
> >>
> >> Jim Holtman
> >> Data Munger Guru
> >>
> >> What is the problem that you are trying to solve?
> >> Tell me what you want to do, not how you want to do it.
> >>
> >> On Sun, Nov 1, 2015 at 7:31 AM, Maram SAlem <marammagdysa...@gmail.com>
> >> wrote:
> >>
> >>> Hi All,
> >>>
> >>> I'm writing a long code that takes long time to execute. So I used the
> >>> Rprof() function and found out that the function that takes about 80%
> of
> >>> the time is the incomb () fucntion (below), and this is most probably
> >>> because of the many explicit for() loops I'm using.
> >>>
> >>> n=18;m=4;p=0.3;alpha=0.2;beta=2
> >>> x=c(3,0,0)
> >>> LD<-list()
> >>>for (i in 1:(m-1))  {
> >>>LD[[i]]<-seq(0,x[i],1)
> >>>}
> >>>LD[[m]]<-seq(0,(n-m-sum(x)),1)
> >>>LED<-expand.grid (LD)
> >>>LED<-as.matrix(LED)
> >>>store1<-numeric(nrow(LED))
> >>> h<- numeric(m-1)
> >>> lm<- numeric(m-1)
> >>>  for (j in 1:length(store1) )
> >>>  {
> >>> incomb<-function(x,alpha,beta) {
> >>>
> >>>  g<-((-1)^(sum(LED[j,])))*(gamma((1/beta)+1))*((alpha)^(-(1/beta)))
> >>>   for (i in 1:(m-1))  {
> >>>h[i]<- choose(x[i],LED[j,i])
> >>>}
> >>>  ik<-prod(h)*choose((n-m-sum(x)),LED[j,m])
> >>> for (i in 1:(m-1)) {
> >>>lm[i]<-(sum(LED[j,1:i])) + i
> >>>  }
> >>> plm<-prod(lm)
> >>>gil<-g*ik/(plm)
> >>>  hlm<-numeric(sum(LED[j,])+(m-1))
> >>>  dsa<-length(hlm)
> >>>   for (i in 1:dsa)
> >>> {
> >>>  ppp<- sum(LED[j,])+(m-1)
> >>>   hlm[i]<-
> >>>  (choose(ppp,i))*((-1)^(i))*((i+1)^((-1)*((1/beta)+1)))
> >>>  }
> >>>   shl<-gil*(sum(hlm)+1)
> >>>   return (shl)
> >>>   }
> >>>store1[j]<-incomb(x,alpha=0.2,beta=2)
> >>>   }
> >>>
> >>>
> >>> I'm trying to use alternatives (for ex. to vectorize things) to the
> >>> explicit for() loops, but things don't work out.
> >>>
> >>> Any suggestions that can help me to speed up the execution of the
> >>> incomb()
> >>> function are much appreciated.
> >>>
> >>> Thanks a lot in advance.
> >>>
> >>> Maram Salem
> >>>
> >>> [[alternative HTML version deleted]]
> >>>
> >>> __
> >>> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> >>> 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, reproducible code.
> >>>
> >>
> >>
> >
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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, reproducible code.
>



-- 
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

"A big computer, a complex algorithm and a long time does not equal
science."

  -Robert Gentleman

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.


Re: [R] monte carlo simulations in permanova in vegan package

2015-10-27 Thread stephen sefick
The example code works, and reports  permutations. Can you provide more
information?

data(dune)
data(dune.env)
adonis(dune ~ Management*A1, data=dune.env, permutations=)



On Tue, Oct 27, 2015 at 3:56 AM, Sean Porter <spor...@ori.org.za> wrote:

> Dear colleagues,
>
>
>
> I am trying to run a PERMANOVA in the vegan package with an appropriate
> number of permutations (see example below), ideally . Obviously that
> number of permutations does not exists so I would like to use Monte Carlo
> permutation tests to derive the probability value, as is done in the
> commercial package PERMANOVA+ for PRIMER. How can I adapt my code so that
> adonis will do so ? Many thanks, Sean
>
>
>
> > permanova <- adonis(species ~ time, data = time, permutations=99,
> method="bray")
>
> > permanova
>
>
>
> Call:
>
> adonis(formula = species ~ time, data = time, permutations = 99,
> method
> = "bray")
>
>
>
> Permutation: free
>
> Number of permutations: 99
>
>
>
> Terms added sequentially (first to last)
>
>
>
>   Df SumsOfSqs  MeanSqs F.Model  R2 Pr(>F)
>
> time   1  0.070504 0.070504  123.65 0.96866   0.01 **
>
> Residuals  4  0.002281 0.000570 0.03134
>
> Total  5  0.072785  1.0
>
> ---
>
> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
>
>
>
>
>
> > permanova <- adonis(species ~ time, data = time, permutations=999,
> method="bray")
>
> 'nperm' > set of all permutations; Resetting 'nperm'.
>
>
>
>
>
>
>
>
>
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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, reproducible code.
>



-- 
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

"A big computer, a complex algorithm and a long time does not equal
science."

  -Robert Gentleman

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.


Re: [R] monte carlo simulations in permanova in vegan package

2015-10-27 Thread stephen sefick
Look at the permute package. I believe this functionality is there.

Please excuse my brevity; this message was sent from my telephone.
On Oct 27, 2015 10:55 AM, "Cade, Brian" <ca...@usgs.gov> wrote:

> Sean:  There are only 20 possible combinations, 6!/(3! x 3!), so you just
> need to enumerate them completely (no Monte Carlo approximation required).
> I don't know if permanova() can do this but you can do it with the mrpp()
> functions and argument (,exact=TRUE) in Blossom package for R.
>
> Brian
>
> Brian S. Cade, PhD
>
> U. S. Geological Survey
> Fort Collins Science Center
> 2150 Centre Ave., Bldg. C
> Fort Collins, CO  80526-8818
>
> email:  ca...@usgs.gov <brian_c...@usgs.gov>
> tel:  970 226-9326
>
>
> On Tue, Oct 27, 2015 at 7:42 AM, Sean Porter <spor...@ori.org.za> wrote:
>
> > Hi Stephen and others,
> >
> >
> >
> > I am trying to run a one-way permanova where I have only 2 levels in the
> > factor “time”, and each level contains only 3 replicates. So because I
> have
> > such few observations (6 in total) and levels (2) there are not enough
> > possible permutations to get a reasonable test (i.e. (2*3)!/ [2!(3!)^2].
> >  That is why for example if I run the analysis with only 99 permutations
> it
> > completes the task. However, if I set the number of permutations to
> > anything larger it returns the message “'nperm' > set of all
> permutations;
> > Resetting 'nperm'.” as the number of possible permutations exceeds the
> > number set by the argument “permutations=”. In PERMANOVA + for PRIMER
> there
> > is a way of dealing with this issue – by using Monte Carlo simulations to
> > generate the p value with a reasonable number of permutations. Hopefully
> > this clarifies my situation and aim?
> >
> >
> >
> > I was therefore hoping there was a way of coding for the Monte-Carlo
> > permutation procedure into adonis?
> >
> >
> >
> > Thanks for your help!
> >
> >
> >
> > From: stephen sefick [mailto:ssef...@gmail.com]
> > Sent: 27 October 2015 03:11 PM
> > To: Sean Porter
> > Cc: r-help@r-project.org
> > Subject: Re: [R] monte carlo simulations in permanova in vegan package
> >
> >
> >
> > The example code works, and reports  permutations. Can you provide
> > more information?
> >
> >
> >
> > data(dune)
> > data(dune.env)
> > adonis(dune ~ Management*A1, data=dune.env, permutations=)
> >
> >
> >
> >
> >
> > On Tue, Oct 27, 2015 at 3:56 AM, Sean Porter <spor...@ori.org.za> wrote:
> >
> > Dear colleagues,
> >
> >
> >
> > I am trying to run a PERMANOVA in the vegan package with an appropriate
> > number of permutations (see example below), ideally . Obviously that
> > number of permutations does not exists so I would like to use Monte Carlo
> > permutation tests to derive the probability value, as is done in the
> > commercial package PERMANOVA+ for PRIMER. How can I adapt my code so that
> > adonis will do so ? Many thanks, Sean
> >
> >
> >
> > > permanova <- adonis(species ~ time, data = time, permutations=99,
> > method="bray")
> >
> > > permanova
> >
> >
> >
> > Call:
> >
> > adonis(formula = species ~ time, data = time, permutations = 99,
> > method
> > = "bray")
> >
> >
> >
> > Permutation: free
> >
> > Number of permutations: 99
> >
> >
> >
> > Terms added sequentially (first to last)
> >
> >
> >
> >   Df SumsOfSqs  MeanSqs F.Model  R2 Pr(>F)
> >
> > time   1  0.070504 0.070504  123.65 0.96866   0.01 **
> >
> > Residuals  4  0.002281 0.000570 0.03134
> >
> > Total  5  0.072785  1.0
> >
> > ---
> >
> > Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> >
> >
> >
> >
> >
> > > permanova <- adonis(species ~ time, data = time, permutations=999,
> > method="bray")
> >
> > 'nperm' > set of all permutations; Resetting 'nperm'.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > [[alternative HTML version deleted]]
> >
> > __
> > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
&g

Re: [R] Installing pre-compiled R in Linux

2015-10-07 Thread stephen sefick
I couldn't tell from the OP's message what distribution they have
installed. If it is redhat (or a derivative), the extra packages for
enterprise linux (epel) has up-to-date R packages to install with yum. I
have had some minor issues with installing A FEW (mostly GIS related)
packages that were easily solved with google and careful reading of the
error messages.
HTH,

Stephen

On Wed, Oct 7, 2015 at 6:32 AM, peter dalgaard <pda...@gmail.com> wrote:

>
> On 07 Oct 2015, at 13:05 , Jeroen Ooms <jeroen.o...@stat.ucla.edu> wrote:
>
> >> On Tue, Oct 6, 2015 at 9:42 PM, Sasikumar Kandhasamy <ckms...@gmail.com>
> wrote:
> >>> Thanks a lot Mike. The Linux distribution we use is "Red Hat Enterprise
> >>> Linux Server release 6.2".
> >
> > On RHEL and CentOS the easiest and most reliable way to get R and R
> > packages is via EPEL. Simply add the EPEL repositories and from there
> > on you can install R and R packages as you would do on Fedora.
> >
>
> Pretty much no Linux distribution expects you to install anything by
> "unzipping compiled code". They generally have a packaging format like .rpm
> or .deb, and even then you can't mix them freely between different
> distributions -- SUSE .rpm are usually not interchangeable with RedHat and
> vice versa. You generally access them from curated package repositories
> using tools like yum or apt-get. One exception may be Slackware. At any
> rate, whereever you got your zipfile from, it is most likely wrong for RHEL.
>
>
> --
> Peter Dalgaard, Professor,
> Center for Statistics, Copenhagen Business School
> Solbjerg Plads 3, 2000 Frederiksberg, Denmark
> Phone: (+45)38153501
> Office: A 4.23
> Email: pd@cbs.dk  Priv: pda...@gmail.com
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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, reproducible code.
>



-- 
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

"A big computer, a complex algorithm and a long time does not equal
science."

  -Robert Gentleman

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.


Re: [R] Quantile Regression without intercept

2015-10-05 Thread stephen sefick
I have never used this, but does the formula interface work like lm? Y~X-1?

On Mon, Oct 5, 2015 at 10:27 AM, Preetam Pal <lordpree...@gmail.com> wrote:

> Hi guys,
>
> Can you instruct me please how to run quantile regression without the
> intercept term? I only know about the rq function under quantreg package,
> but it automatically uses an intercept model. Icant change that, it seems.
>
> I have numeric data on Y variable (Gdp) and 2 X variables (Hpa and
> Unemployment). Their sizes are 125 each.
>
> Appreciate your help with this.
>
> Regards,
> Preetam
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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, reproducible code.
>



-- 
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

"A big computer, a complex algorithm and a long time does not equal
science."

  -Robert Gentleman

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.


Re: [R] reshape: melt and cast

2015-09-01 Thread stephen sefick
You are welcome.

On Tue, Sep 1, 2015 at 10:44 AM, Matthew Pickard <
matthew.david.pick...@gmail.com> wrote:

> Yep, that works. Thanks, Stephen. I should have drawn the parallel with
> Excel Pivot tables sooner.
>
> On Tue, Sep 1, 2015 at 9:36 AM, stephen sefick <ssef...@gmail.com> wrote:
>
>> I would make this minimal. In other words, use an example data set, dput,
>> and use output of dput in a block of reproducible code. I don't understand
>> exactly what you want, but does sum work? If there is more than one record
>> for a given set of factors the sum is the sum of the counts. If only one
>> record, then the sum is the same as the original number.
>>
>> On Tue, Sep 1, 2015 at 10:00 AM, Matthew Pickard <
>> matthew.david.pick...@gmail.com> wrote:
>>
>>> Thanks, Stephen. I've looked into the fun.aggregate argument. I don't
>>> want to aggregate, so I thought leaving it blank (allowing it to default to
>>> NULL) would do that.
>>>
>>>
>>> Here's a corrected post (with further explanation):
>>>
>>> Hi,
>>>
>>> I have data that looks like this:
>>>
>>> >dput(head(ratings))
>>> structure(list(QCode = structure(c(5L, 7L, 5L, 7L, 5L, 7L), .Label =
>>> c("APPEAR",
>>> "FEAR", "FUN", "GRAT", "GUILT", "Joy", "LOVE", "UNGRAT"), class =
>>> "factor"),
>>> PID = structure(c(1L, 1L, 2L, 2L, 3L, 3L), .Label = c("1123",
>>> "1136", "1137", "1142", "1146", "1147", "1148", "1149", "1152",
>>> "1153", "1154", "1156", "1158", "1161", "1164", "1179", "1182",
>>> "1183", "1191", "1196", "1197", "1198", "1199", "1200", "1201",
>>> "1203", "1205", "1207", "1208", "1209", "1214", "1216", "1219",
>>> "1220", "1222", "1223", "1224", "1225", "1226", "1229", "1236",
>>> "1237", "1238", "1240", "1241", "1243", "1245", "1246", "1248",
>>> "1254", "1255", "1256", "1257", "1260", "1262", "1264", "1268",
>>> "1270", "1272", "1278", "1279", "1280", "1282", "1283", "1287",
>>> "1288", "1292", "1293", "1297", "1310", "1311", "1315", "1329",
>>> "1332", "1333", "1343", "1346", "1347", "1352", "1354", "1355",
>>> "1356", "1360", "1368", "1369", "1370", "1378", "1398", "1400",
>>> "1403", "1404", "1411", "1412", "1420", "1421", "1423", "1424",
>>> "1426", "1428", "1432", "1433", "1435", "1436", "1438", "1439",
>>> "1440", "1441", "1443", "1444", "1446", "1447", "1448", "1449",
>>> "1450", "1453", "1454", "1456", "1459", "1460", "1461", "1462",
>>> "1463", "1468", "1471", "1475", "1478", "1481", "1482", "1487",
>>> "1488", "1490", "1493", "1495", "1497", "1503", "1504", "1508",
>>> "1509", "1511", "1513", "1514", "1515", "1522", "1524", "1525",
>>> "1526", "1527", "1528", "1529", "1532", "1534", "1536", "1538",
>>> "1539", "1540", "1543", "1550", "1551", "1552", "1554", "1555",
>>> "1556", "1558", "1559"), class = "fac

Re: [R] reshape: melt and cast

2015-09-01 Thread stephen sefick
t;, "SI4", "SI5", "SI6",
> "SI7", "SI8", "SI9", "SI10", "SI11"), row.names = c(NA, 6L), class =
> "data.frame")
>
>
> > dput(tail(ratings))
> structure(list(QCode = structure(c(3L, 3L, 3L, 1L, 1L, 3L), .Label =
> c("APPEAR",
> "FEAR", "FUN", "GRAT", "GUILT", "Joy", "LOVE", "UNGRAT"), class =
> "factor"),
> PID = structure(c(161L, 162L, 163L, 163L, 164L, 164L), .Label =
> c("1123",
> "1136", "1137", "1142", "1146", "1147", "1148", "1149", "1152",
> "1153", "1154", "1156", "1158", "1161", "1164", "1179", "1182",
> "1183", "1191", "1196", "1197", "1198", "1199", "1200", "1201",
> "1203", "1205", "1207", "1208", "1209", "1214", "1216", "1219",
> "1220", "1222", "1223", "1224", "1225", "1226", "1229", "1236",
> "1237", "1238", "1240", "1241", "1243", "1245", "1246", "1248",
> "1254", "1255", "1256", "1257", "1260", "1262", "1264", "1268",
> "1270", "1272", "1278", "1279", "1280", "1282", "1283", "1287",
> "1288", "1292", "1293", "1297", "1310", "1311", "1315", "1329",
> "1332", "1333", "1343", "1346", "1347", "1352", "1354", "1355",
> "1356", "1360", "1368", "1369", "1370", "1378", "1398", "1400",
> "1403", "1404", "1411", "1412", "1420", "1421", "1423", "1424",
> "1426", "1428", "1432", "1433", "1435", "1436", "1438", "1439",
> "1440", "1441", "1443", "1444", "1446", "1447", "1448", "1449",
> "1450", "1453", "1454", "1456", "1459", "1460", "1461", "1462",
> "1463", "1468", "1471", "1475", "1478", "1481", "1482", "1487",
> "1488", "1490", "1493", "1495", "1497", "1503", "1504", "1508",
> "1509", "1511", "1513", "1514", "1515", "1522", "1524", "1525",
> "1526", "1527", "1528", "1529", "1532", "1534", "1536", "1538",
> "1539", "1540", "1543", "1550", "1551", "1552", "1554", "1555",
> "1556", "1558", "1559"), class = "factor"), RaterName =
> structure(c(2L,
> 2L, 2L, 2L, 2L, 2L), .Label = c("cwormhoudt", "zspeidel"), class =
> "factor"),
> SI1 = c(1L, 1L, 1L, 1L, 1L, 1L), SI2 = c(3L, 2L, 2L, 3L,
> 3L, 2L), SI3 = c(3L, 2L, 3L, 3L, 3L, 2L), SI4 = c(1L, 1L,
> 1L, 1L, 1L, 1L), SI5 = c(1L, 1L, 1L, 1L, 1L, 1L), SI6 = c(1L,
> 1L, 1L, 1L, 1L, 1L), SI7 = c(1L, 1L, 1L, 2L, 2L, 1L), SI8 = c(1L,
> 1L, 1L, 1L, 1L, 1L), SI9 = c(1L, 1L, 1L, 1L, 1L, 1L), SI10 = c(1L,
> 1L, 1L, 2L, 2L, 1L), SI11 = c(1L, 1L, 1L, 1L, 1L, 1L)), .Names =
> c("QCode",
> "PID", "RaterName", "SI1", "SI2", "SI3", "SI4", "SI5", "SI6",
> "SI7", "SI8", "SI9", "SI10", "SI11"), row.names = 2456:2461, class =
> "data.frame")
>
>
> I am trying to use the melt and cast functions to re-arrange to have
> column names QCode, PID, sItem, cwormhoudt, zpeidel.  Under each of the
> last two columns I want the values that correspond to each of RaterNames.
>
> So, I melt the data like this:
>
> mratings = melt(ratings, vari

Re: [R] reshape: melt and cast

2015-08-31 Thread stephen sefick
This is very hard to read. Please use dput to provide data. I believe the
answer is in the manual. Look at the aggregation function argument.

Please excuse my brevity; this message was sent from my telephone.
On Sep 1, 2015 12:11 AM, "Matt Pickard" 
wrote:

> Hi,
>
> I have data that looks like this:
>
>
>
>
>
>
>
>
>
> *> head(ratings)  QCode  PID  RaterName SI1 SI2 SI3 SI4 SI5 SI6 SI7 SI8 SI9
> SI10 SI111 GUILT 1123 cwormhoudt   2   2   3   1   1   1   3   3   3
> 212  LOVE 1123 cwormhoudt   1   2   3   2   1   1   1   1   11
> 33 GUILT 1136 cwormhoudt   1   2   3   1   1   1   2   3   2214
> LOVE 1136 cwormhoudt   1   2   3   1   1   1   1   1   1125 GUILT
> 1137 cwormhoudt   2   2   2   1   1   1   2   3   1216  LOVE 1137
> cwormhoudt   1   3   4   1   1   1   1   1   114*
>
>
>
>
>
>
>
>
> *> tail(ratings)  QCode  PID RaterName SI1 SI2 SI3 SI4 SI5 SI6 SI7 SI8
> SI9 SI10 SI112456FUN 1555  zspeidel   1   3   3   1   1   1   1   1
> 1112457FUN 1556  zspeidel   1   2   2   1   1   1   1   1
> 1112458FUN 1558  zspeidel   1   2   3   1   1   1   1   1
> 1112459 APPEAR 1558  zspeidel   1   3   3   1   1   1   2   1
> 1212460 APPEAR 1559  zspeidel   1   3   3   1   1   1   2   1
> 1212461FUN 1559  zspeidel   1   2   2   1   1   1   1   1
> 111*
> I am trying to use the melt and cast functions to re-arrange it to look
> like this:
>
>
>
>
>
>
>
>
> *   QCode  PID sItem cwormhoudt zspeidel1 APPEAR 1123   SI1
> 112 APPEAR 1123   SI2  413 APPEAR 1123
> SI3  124 APPEAR 1123   SI4  315 APPEAR
> 1123   SI5  116 APPEAR 1123   SI6  13*
> So, I melt the data like this:
>
>
>
> *mratings = melt(ratings, variable_name="sItem")*
> Then cast the data like this:
>
>
> *> outData = cast(mratings, QCode + PID + sItem ~ RaterName)Aggregation
> requires fun.aggregate: length used as default*
>
> But the value columns appear to be displaying counts and not the original
> values:
>
>
>
>
>
>
>
>
>
>
>
>
>
> *> head(outData)   QCode  PID sItem cwormhoudt zspeidel1 APPEAR 1123
> SI1  112 APPEAR 1123   SI2  113 APPEAR
> 1123   SI3  114 APPEAR 1123   SI4  115
> APPEAR 1123   SI5  116 APPEAR 1123   SI6  1
> 1> which(outData$zpeidel==3)integer(0)*
> How to I prevent cast from aggregating the data according to counts?  Am I
> doing something wrong?
>
> Thanks in advance.
>
> MP
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.


Re: [R] Choosing columns by number

2015-08-25 Thread stephen sefick
?grep

I think this will do what you want.

#something like
a - data.frame(a=rnorm(10), b=rnorm(10), c=rnorm(10), d=rnorm(10))

toMatch - c(a, d)

grep(paste(toMatch,collapse=|), colnames(a))

#to subset
a[,grep(paste(toMatch,collapse=|), colnames(a))]


On Tue, Aug 25, 2015 at 10:17 AM, Sam Albers tonightstheni...@gmail.com
wrote:

 Hi all,

 This is a process question. How do folks efficiently identify column
 numbers in a dataframe without manually counting them. For example, if I
 want to choose columns from the iris dataframe I know of two options. I can
 do this:

  str(iris)'data.frame':150 obs. of  5 variables:
  $ Sepal.Length: num  5.1 4.9 4.7 4.6 5 5.4 4.6 5 4.4 4.9 ...
  $ Sepal.Width : num  3.5 3 3.2 3.1 3.6 3.9 3.4 3.4 2.9 3.1 ...
  $ Petal.Length: num  1.4 1.4 1.3 1.5 1.4 1.7 1.4 1.5 1.4 1.5 ...
  $ Petal.Width : num  0.2 0.2 0.2 0.2 0.2 0.4 0.3 0.2 0.2 0.1 ...
  $ Species : Factor w/ 3 levels setosa,versicolor,..: 1 1 1 1
 1 1 1 1 1 1 ...

 or this:

  names(iris)[1] Sepal.Length Sepal.Width  Petal.Length
 Petal.Width  Species

 Neither option explicitly identifies the column number so that I can
 do something like this:

 iris[,c(2,4)]

 I feel like there must be a better way to do this so I wanted to ask
 the collective wisdom here what people do to accomplish this.
 Obviously this is a trivial example, but the issue really becomes
 problematic when you have a large dataframe.

 Thanks in advance!

 Sam

 [[alternative HTML version deleted]]

 __
 R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
 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, reproducible code.




-- 
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

A big computer, a complex algorithm and a long time does not equal
science.

  -Robert Gentleman

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.


Re: [R] Fwd: ayuda- help me

2015-08-25 Thread stephen sefick
You will generally get more and better responses if you have a reproducible
example. Please read the posting guide.

Please excuse my brevity; this message was sent from my telephone.
On Aug 25, 2015 4:14 PM, Paulo Fonseca paulocfonse...@gmail.com wrote:

 Cordial saludo,

 Muy amablemente solicito su ayuda con la siguiente inquietud:

 Estoy tratando de interpolar datos de variables climáticas en R pero no he
 podido ustedes me podría colaborar con un instructivo que me guié paso a
 paso como se hace , ya que el objeto es tener como resultado el mapa de
 precipitación para un determinado año.

 De antemano agradezco su atención y su colaboración

 Atentamente

 Paulo Fonseca


 Best regard,

 I kindly request your assistance with the following concers:

 I'm trying to interpolate climatic data variables in R but I could not you
 could help me with intructions to guide me step by step how it is done,
 since the object is to result in the precipitation map for a given year.

 thaks in advance for your attention and colaboration.

 Sincerely

 Paulo Fonseca

 [[alternative HTML version deleted]]

 __
 R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
 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, reproducible code.

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.

Re: [R] How to validate the cluster analysis?

2015-06-10 Thread stephen sefick
You could look at silhouette width in, I think, the cluster package.

Please excuse my brevity; this message was sent from my telephone.
On Jun 10, 2015 1:37 AM, My List mylistt...@gmail.com wrote:

 All,

 I am new to the world of statistics. I am interested in finding out the
 validation techniques employed on a cluster analysis. Any point of
 reference or site would be helpful. I have read about the clValid package
 and usage of the function on cluster.stats() in the fpc package.

 Thanks in Advance,
 Harmeet

 PS: I have marked this mail to both help and devel list. Is it ok?

 [[alternative HTML version deleted]]

 __
 R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
 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, reproducible code.


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.


Re: [R] problems editing R console

2015-06-07 Thread stephen sefick
?saveRDS

On Sun, Jun 7, 2015 at 5:58 PM, Rosa Oliveira rosit...@gmail.com wrote:

 Dear Mark,


 I’ll try to explain better.

 Imagine I write:

 library(foreign)
 library(nlme)

 set.seed(1000)
 n.sample-1 #sample size
 M - 5
 DP_x - 2
 x - rnorm(n.sample,M,DP_x)
 p - pnorm(-3+x)
 y - rbinom(n.sample,1,p)
 dp_erro - 0.01
 erro - rnorm(n.sample,0,dp_erro)
 x.erro - x+erro

 but with a function, with 2000 simulations.
 I save my “output” and I get X.erro in a .txt file. (text edit file).

 I do another setting with DP_x=3 and save, and so on.

 For some reason I realize I’ve done my simulation the wrong way and I have
 to apply a correction, for example:

 x.erro = 1.4X+erro, i.e. in the truth I could use my first X and erro
 values in each setting, but as it is in a .txt file I can’t use them any
 more. Is there a way to save the results in a  format that I can use the
 values? Just apply my corrections and don’t have to do the 2000 simulations
 for each setting again?

 My problem is that the function I use takes 3 days running, and just 500
 simulations :(

 Best,
 RO


 Atenciosamente,
 Rosa Oliveira

 --

 


 Rosa Celeste dos Santos Oliveira,

 E-mail: rosit...@gmail.com
 Tlm: +351 939355143
 Linkedin: https://pt.linkedin.com/in/rosacsoliveira

 
 Many admire, few know
 Hippocrates

  On 07 Jun 2015, at 23:03, Mark Sharp msh...@txbiomed.org wrote:
 
  I cannot understand your request as stated. Can you provide a small
 example?
 
  Mark
 
  R. Mark Sharp, Ph.D.
  msh...@txbiomed.org
 
  On Jun 7, 2015, at 2:49 PM, Rosa Oliveira rosit...@gmail.com wrote:
 
  Dear all,
 
  I’m doing simulations on R, and as my code is being changed and
 improved I need to, sometimes, work in finished simulations, i.e,
 
  After my simulation is  over I need to settle another setting.
  The problem is that I need to get back to the previous result.
 
  When I save the result it saves as txt, so I can’t edit that result any
 more.
 
  Imagine I save a setting and save the mean, nonetheless, in another
 setting the mean as problems, so I have to ask the median.
 
  As I have to have the same statistics to all settings, nowadays I have
 to run my first setting again.
 
  My advisor told me that I could save another way so I can “edit” my
 first result. Is it possible?
 
  I tried to save as save my workplace, … but after I don’t know what
 to do with it.
 
  Can you please help me?
  I know is a naive question, but I have to go through this every 3 days
 (time each simulation takes long). And my work is being delayed :(
 
 
  Best,
  RO
 
 
 
  Atenciosamente,
  Rosa Oliveira
 
  --
 
 
 
 
  Rosa Celeste dos Santos Oliveira,
 
  E-mail: rosit...@gmail.com
  Tlm: +351 939355143
  Linkedin: https://pt.linkedin.com/in/rosacsoliveira
 
 
  Many admire, few know
  Hippocrates
 
  __
  R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
  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, reproducible code.
 
 
 
 
 
 
 

 __
 R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
 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, reproducible code.




-- 
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

A big computer, a complex algorithm and a long time does not equal
science.

  -Robert Gentleman

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.

Re: [R] pls - No variable selection

2015-05-27 Thread stephen sefick
Hi Barry,

I looked at the source code for pls quickly and couldn't find where/why
this message is being printed. Maybe an undocumented behavior? I would ask
the package maintainer. It doesn't look like a warning - just that there
was no variable selection.
HTH,

Stephen

On Wed, May 27, 2015 at 8:03 AM, Barry King barry.k...@qlx.com wrote:

 I am attempting to use mixOmics' pls() on a problem with 16 rows
 and 27 columns.  When I run pls I get the message No variable selection.
 I have included a small problem below that produces this message.
 What am I doing wrong?  Any help is appreciated.


 #= Begin small reproducible sample program =
 library(mixOmics)

 X - matrix(c(2766, 2610, 3306, 3630,
   1492, 1419, 1369, 1158,
   2450, 2379, 2400, 2055,
   2751, 2883, 3492, 3570,
   2652, 2691, 3225, 3285,
   3993, 4722, 6147, 6720,
   4032, 4350, 5430, 5763,
   4530, 5190, 6910, 7580,
   4077, 4410, 5460, 5857,
   3450, 3432, 3969, 4020,
   4989, 5301, 6807, 7425,
   5340, 5790, 7590, 8390,
   3162, 3477, 4365, 4650,
   4380, 4695, 6018, 6510,
   4587, 4200, 5040, 5289,
   4017, 4725, 6090, 6570),
 ncol=4)
 colnames(X) - c(v1,v2,v3,v4)

 Y - matrix(c( 3.0110,
0.,
0.,
1.4820,
1.1160,
3.3970,
2.4280,
4.0240,
2.2750,
0.9588,
3.1900,
4.1320,
2.1600,
3.0940,
1.6040,
3.1620),
 ncol=1)
 colnames(Y) - c(y)

 mpls - pls(X, Y,  mode=regression, ncomp=2)
 mpls

 #= End small reproducible sample program, begin console output =

 Call:
  pls(X = X, Y = Y, mode = regression)

  PLS with a 'regression' mode with 2 PLS components.
  You entered data X of dimensions: 16 4
  You entered data Y of dimensions: 16 1

  No variable selection.

  Available components:
  
  loading vectors: see object$loadings
  variates: see object$variates
  variable names: see object$names

 #= End console output =

 Barry King
 Associate Professor of Information Technology
 Butler University

 [[alternative HTML version deleted]]

 __
 R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
 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, reproducible code.




-- 
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

A big computer, a complex algorithm and a long time does not equal
science.

  -Robert Gentleman

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.


Re: [R] PCA analysis and bootstraped loadings

2015-04-13 Thread stephen sefick
Hi,

Please search the mailing list archives for this, or type bootstrapped PCA
R into google. Please provide a minimal self-contained example of what you
are trying to solve. Please read the posting guide that is referenced at
the end of every email.
kind regards,

Stephen

On Mon, Apr 13, 2015 at 11:07 AM, Efstathia Defteraiou 
efstathia.deftera...@student.uibk.ac.at wrote:

 Dear All,

 I am relatively new in R.
 Im working with the 'psych' package and 'principal' function.
 I would like to know how to generate the bootstraped conf.intervals for
 loadings,
 looking for sth similar to setting 'n.iter' argument for the 'fa' function.

 If in 'psych' can't work and suggest me the 'boot' package please provide
 specific Rscript since I don't understand the commands and arguments that
 have to be used before calling the function 'boot'( what are indices? what
 to define as what inside function(){})

 The names Im using are included in the following code:
 'newdata3.1' is my data and provided as data.frame

 makingtheanalysis3.1 -principal(newdata3.1, nfactors =3,
   residuals = FALSE,
   covar=FALSE,rotate=varimax,scores=TRUE)


 I am sorry for not providing a specific code but my data are too large

 Any Help appreciated
 Cheers!

 __
 R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
 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, reproducible code.




-- 
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

A big computer, a complex algorithm and a long time does not equal
science.

  -Robert Gentleman

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.


Re: [R] Multiple Plots using ggplot

2015-03-31 Thread stephen sefick
The error message is very informative. You named a column in the melted
data Start, and told ggplot to use start. start is a function. R is
case sensitive.

On Tue, Mar 31, 2015 at 8:46 AM, Frederic Ntirenganya ntfr...@gmail.com
wrote:

 Hi All,

 Thanks for the help. I want to plot some of the columns on the same graph
 not all of them. Sorry, I failed to follow the instructions. Here is the
 output of *dput()* but I don't know how it works.

  dput(head(data))structure(list(Date = structure(c(-6575, -6209, -5844, 
  -5479,
 -5114, -4748), class = Date), Number.of.Rain.Days = c(86L,
 96L, 114L, 119L, 123L, 124L), Total.rain = c(1139.952, 977.646,
 1382.014, 1323.086, 1266.444, 1235.964), Start.of.Rain..i. = c(92L,
 98L, 92L, 100L, 92L, 92L), Start.of.Rain..ii. = c(239L, 98L,
 92L, 100L, 92L, 92L), Start.of.Rain..iii. = c(112L, 112L, 120L,
 125L, 119L, 112L), Start.Rain..iv. = c(112L, 112L, 120L, 174L,
 119L, 112L), End.of.Rain.Season = c(228L, 229L, 240L, 228L, 228L,
 228L)), .Names = c(Date, Number.of.Rain.Days, Total.rain,
 Start.of.Rain..i., Start.of.Rain..ii., Start.of.Rain..iii.,
 Start.Rain..iv., End.of.Rain.Season), row.names = c(NA, 6L
 ), class = data.frame)

  I think I need subset function then melt. Here is the approach I used:

 d - subset(df1, 
 select=c(Date,Start.of.Rain..i.,Start.of.Rain..ii.,Start.of.Rain..iii.))
 d
 d2 - melt(d ,  id = 'Date', variable_name = 'Start')

 ggplot(d2, aes(Date,value)) + geom_line(aes(colour = start),type = h)

  but the error is:

 Don't know how to automatically pick scale for object of type function. 
 Defaulting to continuousError in data.frame(colour = function (x, ...)  :
   arguments imply differing number of rows: 0, 183


 Thanks,

 Frederic.



 Frederic Ntirenganya
 Maseno University,
 African Maths Initiative,
 Kenya.
 Mobile:(+254)718492836
 Email: fr...@aims.ac.za
 https://sites.google.com/a/aims.ac.za/fredo/

 On Tue, Mar 31, 2015 at 4:20 PM, stephen sefick ssef...@gmail.com wrote:

 Your data and post is still not provided in one of the formats provided
 here:
 http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example.
 I am unsure of what you want to do, but I have made a reproducible example
 that might help.

 zz - Date Number.of.Rain.Days Total.rain Start.of.Rain..i.
 Start.of.Rain..ii.   Start.of.Rain..iii.
  1952-01-01  86   1139.95292
239 11
  1953-01-01  96977.64698
 98 11
  1954-01-01 114   1382.01492
 92 12
  1955-01-01 119   1323.086   100
100 12
  1956-01-01 123   1266.44492
 92 11
  1957-01-01 124   1235.96492
 92 11

 library(reshape)
 library(ggplot2)

 Data - read.table(text=zz, header = TRUE)

 df1 -data.frame(Data)

 df2 - melt(df1 ,  id = c('Date', 'Number.of.Rain.Days'))

 df3 - df2[-grep(Total.rain, df2$variable),]

 qplot(Date,value, data=df3) +facet_wrap(~variable)

 On Tue, Mar 31, 2015 at 2:55 AM, Frederic Ntirenganya ntfr...@gmail.com
 wrote:

  Hi All,

 Sorry for the shape of data which was not good enough.This is how my data 
 look like.

 I want to plot multiple using ggplot function from a data frame of many 
 columns. I want to plot only Start.of.Rain..i., Start.of.Rain..ii. and  
 Start.of.Rain..iii. and I failed to make it. What I want is to compare 
 Start.of.Rain..i., Start.of.Rain..ii. and Start.of.Rain..iii. by plotting 
 vertical line. I also need to add points to the plot to be able to separate 
 them. The x-axis must be date column. Thanks!

 Here is how the data look like and how I tried to make it.



 Date Number.of.Rain.Days Total.rain Start.of.Rain..i. Start.of.Rain..ii.
 Start.of.Rain..iii. 1952-01-01 86 1139.952 92 239 11 1953-01-01 96 977.646
 98 98 11 1954-01-01 114 1382.014 92 92 12 1955-01-01 119 1323.086 100 100
 12 1956-01-01 123 1266.444 92 92 11 1957-01-01 124 1235.964 92 92 11


 Here is how I tried to solve the problem.

 df1 -data.frame(data)
 df1
 df2 - melt(df1 ,  id = 'Date', variable_name = 'start of Rains')
 df2

 ggplot(df2, aes(Date,value)) + geom_line(aes(colour =red),type = h)

 Kindly any help is welcome. Thanks

 Regards,
 Frederic.

 Frederic Ntirenganya
 Maseno University,
 African Maths Initiative,
 Kenya.
 Mobile:(+254)718492836
 Email: fr...@aims.ac.za
 https://sites.google.com/a/aims.ac.za/fredo/

 On Tue, Mar 31, 2015 at 9:24 AM, Jeff Newmiller 
 jdnew...@dcn.davis.ca.us wrote:

 This is no better because (a) you are still posting using HTML format,
 and (b) using printed output loses the internal representation of the data.
 The dput function is very helpful for solving this. [1]

 [1]
 http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example

Re: [R] Multiple Plots using ggplot

2015-03-31 Thread stephen sefick
Your data and post is still not provided in one of the formats provided
here:
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example.
I am unsure of what you want to do, but I have made a reproducible example
that might help.

zz - Date Number.of.Rain.Days Total.rain Start.of.Rain..i.
Start.of.Rain..ii.   Start.of.Rain..iii.
 1952-01-01  86   1139.95292
 239 11
 1953-01-01  96977.64698
  98 11
 1954-01-01 114   1382.01492
  92 12
 1955-01-01 119   1323.086   100
 100 12
 1956-01-01 123   1266.44492
  92 11
 1957-01-01 124   1235.96492
  92 11

library(reshape)
library(ggplot2)

Data - read.table(text=zz, header = TRUE)

df1 -data.frame(Data)

df2 - melt(df1 ,  id = c('Date', 'Number.of.Rain.Days'))

df3 - df2[-grep(Total.rain, df2$variable),]

qplot(Date,value, data=df3) +facet_wrap(~variable)

On Tue, Mar 31, 2015 at 2:55 AM, Frederic Ntirenganya ntfr...@gmail.com
wrote:

  Hi All,

 Sorry for the shape of data which was not good enough.This is how my data 
 look like.

 I want to plot multiple using ggplot function from a data frame of many 
 columns. I want to plot only Start.of.Rain..i., Start.of.Rain..ii. and  
 Start.of.Rain..iii. and I failed to make it. What I want is to compare 
 Start.of.Rain..i., Start.of.Rain..ii. and Start.of.Rain..iii. by plotting 
 vertical line. I also need to add points to the plot to be able to separate 
 them. The x-axis must be date column. Thanks!

 Here is how the data look like and how I tried to make it.



 Date Number.of.Rain.Days Total.rain Start.of.Rain..i. Start.of.Rain..ii.
 Start.of.Rain..iii. 1952-01-01 86 1139.952 92 239 11 1953-01-01 96 977.646
 98 98 11 1954-01-01 114 1382.014 92 92 12 1955-01-01 119 1323.086 100 100
 12 1956-01-01 123 1266.444 92 92 11 1957-01-01 124 1235.964 92 92 11


 Here is how I tried to solve the problem.

 df1 -data.frame(data)
 df1
 df2 - melt(df1 ,  id = 'Date', variable_name = 'start of Rains')
 df2

 ggplot(df2, aes(Date,value)) + geom_line(aes(colour =red),type = h)

 Kindly any help is welcome. Thanks

 Regards,
 Frederic.

 Frederic Ntirenganya
 Maseno University,
 African Maths Initiative,
 Kenya.
 Mobile:(+254)718492836
 Email: fr...@aims.ac.za
 https://sites.google.com/a/aims.ac.za/fredo/

 On Tue, Mar 31, 2015 at 9:24 AM, Jeff Newmiller jdnew...@dcn.davis.ca.us
 wrote:

 This is no better because (a) you are still posting using HTML format,
 and (b) using printed output loses the internal representation of the data.
 The dput function is very helpful for solving this. [1]

 [1]
 http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example

 ---
 Jeff NewmillerThe .   .  Go
 Live...
 DCN:jdnew...@dcn.davis.ca.usBasics: ##.#.   ##.#.  Live
 Go...
   Live:   OO#.. Dead: OO#..  Playing
 Research Engineer (Solar/BatteriesO.O#.   #.O#.  with
 /Software/Embedded Controllers)   .OO#.   .OO#.
 rocks...1k

 ---
 Sent from my phone. Please excuse my brevity.

 On March 30, 2015 10:56:48 PM PDT, Frederic Ntirenganya 
 ntfr...@gmail.com wrote:
 Hi Stephen,
 
 Sorry, the data came in bad way.
 Here is the head of the data.
 
  head(data)Date Number.of.Rain.Days Total.rain
 Start.of.Rain..i. Start.of.Rain..ii. Start.of.Rain..iii.
 Start.Rain..iv.
 1 1952-01-01  86   1139.95292
   239 112 112
 2 1953-01-01  96977.64698
98 112 112
 3 1954-01-01 114   1382.01492
92 120 120
 4 1955-01-01 119   1323.086   100
   100 125 174
 5 1956-01-01 123   1266.44492
92 119 119
 6 1957-01-01 124   1235.96492
92 112 112
 
 
 
 Frederic Ntirenganya
 Maseno University,
 African Maths Initiative,
 Kenya.
 Mobile:(+254)718492836
 Email: fr...@aims.ac.za
 https://sites.google.com/a/aims.ac.za/fredo/
 
 On Mon, Mar 30, 2015 at 5:34 PM, stephen sefick ssef...@gmail.com
 wrote:
 
  Hi Frederic,
 
  Can you provide a minimal reproducible example including either real
 data
  (dput), or simulated data that mimics your situation? This will allow
 more
  people to help.
 
  Stephen
 
  On Mon, Mar 30, 2015 at 8:39 AM, Frederic Ntirenganya
 ntfr...@gmail.com
  wrote

Re: [R] Multiple Plots using ggplot

2015-03-30 Thread stephen sefick
Hi Frederic,

Can you provide a minimal reproducible example including either real data
(dput), or simulated data that mimics your situation? This will allow more
people to help.

Stephen

On Mon, Mar 30, 2015 at 8:39 AM, Frederic Ntirenganya ntfr...@gmail.com
wrote:

 Dear All,

 I want to plot multiple using ggplot function from a data frame of
 many columns. I want to plot only str1, str2 and str3 and I failed to
 make it. What I want is to compare str1, str2 and str3 by plotting
 vertical line. I also need to add points to the plot to be able to
 separate them.


 Here is how the data look like and how I tried to make it.

 Date NumberofRaindays TotalRains str1 str2 str3 1/1/1952 86 1360.5 92 120
 112 1/1/1953 96 1100 98 100 110
 ...   
  ...  

 df1 -data.frame(data)
 df1
 df2 - melt(df1 ,  id = 'Date', variable_name = 'start of Rains')
 df2

 ggplot(df2, aes(Date,value)) + geom_line(aes(colour =red),type = h)

 Kindly any help is welcome. Thanks

 Regards,
 Frederic.

 Frederic Ntirenganya
 Maseno University,
 African Maths Initiative,
 Kenya.
 Mobile:(+254)718492836
 Email: fr...@aims.ac.za
 https://sites.google.com/a/aims.ac.za/fredo/

 [[alternative HTML version deleted]]

 __
 R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
 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, reproducible code.




-- 
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

A big computer, a complex algorithm and a long time does not equal
science.

  -Robert Gentleman

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.


Re: [R] Installing R on Linux Red Hat Server

2015-03-12 Thread stephen sefick
Axel, I am running SL 6.5. I use EPEL for R related things without much
hassle.
FWIW,

Stephen

On Thu, Mar 12, 2015 at 3:39 PM, Axel Urbiz axel.ur...@gmail.com wrote:

 Hello,

 My apologies if this is not the right place to post this question.

 I need to get R installed on a Linux Red Hat server. I have very limited
 exposure to R and would appreciate some basic guidance if you could point
 me to resources describing the process, requirements, etc.

 Thank you in advance for any help.

 Best,
 Axel.

 [[alternative HTML version deleted]]

 __
 R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
 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, reproducible code.




-- 
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

A big computer, a complex algorithm and a long time does not equal
science.

  -Robert Gentleman

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.


Re: [R] rJava Scientific Linux 6.5 - Can not install

2015-02-03 Thread stephen sefick
I have solved the problem. Here are the steps in case this will help
anyone.

1) I downloaded, compiled, and installed latest R sources.
2) made sure I had all of the R development libraries install through
packages manager
3) update java jkd 1.6* to java jkd 1.7*
4) ran sudo R CMD javareconf
JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75.x86_64/
5) Ensured all of the fields in the output of 4 were populated
6) in a sudo R session, I ran install.packages(rJava,
library=personal_library)

Stephen


On Mon, Feb 2, 2015 at 2:39 PM, stephen sefick ssef...@gmail.com wrote:

 Included at the end of this message is the full compiler output. I have
 installed jre-7 from Oracle; The java-1.7.0-jdk* packages and javacc are
 installed. It looks like the archiver, header prep., and compiler are
 missing. I can provide anything else that can help solve my problem. I
 really appreciate all of the help. Kindest regards.

 checking for gcc... gcc -std=gnu99
 checking whether the C compiler works... yes
 checking for C compiler default output file name... a.out
 checking for suffix of executables...
 checking whether we are cross compiling... no
 checking for suffix of object files... o
 checking whether we are using the GNU C compiler... yes
 checking whether gcc -std=gnu99 accepts -g... yes
 checking for gcc -std=gnu99 option to accept ISO C89... none needed
 checking how to run the C preprocessor... gcc -std=gnu99 -E
 checking for grep that handles long lines and -e... /bin/grep
 checking for egrep... /bin/grep -E
 checking for ANSI C header files... yes
 checking for sys/wait.h that is POSIX.1 compatible... yes
 checking for sys/types.h... yes
 checking for sys/stat.h... yes
 checking for stdlib.h... yes
 checking for string.h... yes
 checking for memory.h... yes
 checking for strings.h... yes
 checking for inttypes.h... yes
 checking for stdint.h... yes
 checking for unistd.h... yes
 checking for string.h... (cached) yes
 checking sys/time.h usability... yes
 checking sys/time.h presence... yes
 checking for sys/time.h... yes
 checking for unistd.h... (cached) yes
 checking for an ANSI C-conforming const... yes
 checking whether time.h and sys/time.h may both be included... yes
 configure: checking whether gcc -std=gnu99 supports static inline...
 yes
 checking whether setjmp.h is POSIX.1 compatible... yes
 checking whether sigsetjmp is declared... yes
 checking whether siglongjmp is declared... yes
 checking Java support in R... present:
 interpreter : '/usr/bin/java'
 archiver: ''
 compiler: ''
 header prep.: ''
 cpp flags   : 
 '-I/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/../include 
 -I/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/../include/linux'
 java libs   : 
 '-L/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/server 
 -ljvm'configure: error: Java Development Kit (JDK) is missing or not 
 registered in R
 Make sure R is configured with full Java support (including JDK). Run
 R CMD javareconf
 as root to add Java support to R.

 If you don't have root privileges, run
 R CMD javareconf -e

 to set all Java-related variables and then install rJava.



 On Mon, Feb 2, 2015 at 12:54 PM, Jeff Newmiller jdnew...@dcn.davis.ca.us
 wrote:

 Don't know anything about SL but have you installed a Java run time
 independent of R?

 ---
 Jeff NewmillerThe .   .  Go
 Live...
 DCN:jdnew...@dcn.davis.ca.usBasics: ##.#.   ##.#.  Live
 Go...
   Live:   OO#.. Dead: OO#..  Playing
 Research Engineer (Solar/BatteriesO.O#.   #.O#.  with
 /Software/Embedded Controllers)   .OO#.   .OO#.
 rocks...1k

 ---
 Sent from my phone. Please excuse my brevity.

 On February 2, 2015 10:39:14 AM PST, stephen sefick ssef...@gmail.com
 wrote:
 Hello all,
 
 I am having a problem with installing rJava on SL 6.5. I am having
 compile
 errors when I try to from CRAN using install.packages(XLConnect,
 repos=
 http://cran.rstudio.com/;). I can provide anything necessary, but I am
 unsure what to provide. Thank you for your help in advance.
 
 output of sessionInfo():
 R version 3.1.0 Patched (2014-06-15 r65949)
 Platform: x86_64-unknown-linux-gnu (64-bit)
 
 locale:
  [1] LC_CTYPE=en_US.utf8   LC_NUMERIC=C
  [3] LC_TIME=en_US.utf8LC_COLLATE=en_US.utf8
  [5] LC_MONETARY=en_US.utf8LC_MESSAGES=en_US.utf8
  [7] LC_PAPER=en_US.utf8   LC_NAME=C
  [9] LC_ADDRESS=C  LC_TELEPHONE=C
 [11] LC_MEASUREMENT=en_US.utf8 LC_IDENTIFICATION=C
 
 attached base packages:
 [1] graphics  grDevices utils datasets  stats methods   base
 
 other attached packages:
 [1] devtools_1.7.0 ggplot2_1.0.0
 
 loaded via a namespace (and not attached):
  [1] colorspace_1.2-4 digest_0.6.8 grid_3.1.0   gtable_0.1.2
  [5] MASS_7.3-37

Re: [R] rJava Scientific Linux 6.5 - Can not install

2015-02-02 Thread stephen sefick
Included at the end of this message is the full compiler output. I have
installed jre-7 from Oracle; The java-1.7.0-jdk* packages and javacc are
installed. It looks like the archiver, header prep., and compiler are
missing. I can provide anything else that can help solve my problem. I
really appreciate all of the help. Kindest regards.

checking for gcc... gcc -std=gnu99
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc -std=gnu99 accepts -g... yes
checking for gcc -std=gnu99 option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for string.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking whether time.h and sys/time.h may both be included... yes
configure: checking whether gcc -std=gnu99 supports static inline...
yes
checking whether setjmp.h is POSIX.1 compatible... yes
checking whether sigsetjmp is declared... yes
checking whether siglongjmp is declared... yes
checking Java support in R... present:
interpreter : '/usr/bin/java'
archiver: ''
compiler: ''
header prep.: ''
cpp flags   : '-I/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/../include
-I/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/../include/linux'
java libs   : 
'-L/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/server
-ljvm'configure: error: Java Development Kit (JDK) is missing or not
registered in R
Make sure R is configured with full Java support (including JDK). Run
R CMD javareconf
as root to add Java support to R.

If you don't have root privileges, run
R CMD javareconf -e

to set all Java-related variables and then install rJava.



On Mon, Feb 2, 2015 at 12:54 PM, Jeff Newmiller jdnew...@dcn.davis.ca.us
wrote:

 Don't know anything about SL but have you installed a Java run time
 independent of R?
 ---
 Jeff NewmillerThe .   .  Go Live...
 DCN:jdnew...@dcn.davis.ca.usBasics: ##.#.   ##.#.  Live
 Go...
   Live:   OO#.. Dead: OO#..  Playing
 Research Engineer (Solar/BatteriesO.O#.   #.O#.  with
 /Software/Embedded Controllers)   .OO#.   .OO#.  rocks...1k
 ---
 Sent from my phone. Please excuse my brevity.

 On February 2, 2015 10:39:14 AM PST, stephen sefick ssef...@gmail.com
 wrote:
 Hello all,
 
 I am having a problem with installing rJava on SL 6.5. I am having
 compile
 errors when I try to from CRAN using install.packages(XLConnect,
 repos=
 http://cran.rstudio.com/;). I can provide anything necessary, but I am
 unsure what to provide. Thank you for your help in advance.
 
 output of sessionInfo():
 R version 3.1.0 Patched (2014-06-15 r65949)
 Platform: x86_64-unknown-linux-gnu (64-bit)
 
 locale:
  [1] LC_CTYPE=en_US.utf8   LC_NUMERIC=C
  [3] LC_TIME=en_US.utf8LC_COLLATE=en_US.utf8
  [5] LC_MONETARY=en_US.utf8LC_MESSAGES=en_US.utf8
  [7] LC_PAPER=en_US.utf8   LC_NAME=C
  [9] LC_ADDRESS=C  LC_TELEPHONE=C
 [11] LC_MEASUREMENT=en_US.utf8 LC_IDENTIFICATION=C
 
 attached base packages:
 [1] graphics  grDevices utils datasets  stats methods   base
 
 other attached packages:
 [1] devtools_1.7.0 ggplot2_1.0.0
 
 loaded via a namespace (and not attached):
  [1] colorspace_1.2-4 digest_0.6.8 grid_3.1.0   gtable_0.1.2
  [5] MASS_7.3-37  munsell_0.4.2plyr_1.8.1   proto_0.3-10
  [9] Rcpp_0.11.4  reshape2_1.4.1   scales_0.2.4 stringr_0.6.2
 [13] tools_3.1.0




-- 
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted

[R] rJava Scientific Linux 6.5 - Can not install

2015-02-02 Thread stephen sefick
Hello all,

I am having a problem with installing rJava on SL 6.5. I am having compile
errors when I try to from CRAN using install.packages(XLConnect, repos=
http://cran.rstudio.com/;). I can provide anything necessary, but I am
unsure what to provide. Thank you for your help in advance.

output of sessionInfo():
R version 3.1.0 Patched (2014-06-15 r65949)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.utf8   LC_NUMERIC=C
 [3] LC_TIME=en_US.utf8LC_COLLATE=en_US.utf8
 [5] LC_MONETARY=en_US.utf8LC_MESSAGES=en_US.utf8
 [7] LC_PAPER=en_US.utf8   LC_NAME=C
 [9] LC_ADDRESS=C  LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.utf8 LC_IDENTIFICATION=C

attached base packages:
[1] graphics  grDevices utils datasets  stats methods   base

other attached packages:
[1] devtools_1.7.0 ggplot2_1.0.0

loaded via a namespace (and not attached):
 [1] colorspace_1.2-4 digest_0.6.8 grid_3.1.0   gtable_0.1.2
 [5] MASS_7.3-37  munsell_0.4.2plyr_1.8.1   proto_0.3-10
 [9] Rcpp_0.11.4  reshape2_1.4.1   scales_0.2.4 stringr_0.6.2
[13] tools_3.1.0



-- 
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

A big computer, a complex algorithm and a long time does not equal
science.

  -Robert Gentleman

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.


[R] RcppArmadillo compilation errors (Scientific Linux 6.5)

2014-12-03 Thread stephen sefick
I would appreciate any help that you may be able to give. Please let me
know if any more information is required.

I get a the following error when I try to install RcppArmadillo in a
session started with R --vanilla using the
install.packages(RcppArmadillo) command.

make: *** [RcppArmadillo.o] Error 1
ERROR: compilation failed for package ‘RcppArmadillo’
* removing
‘/home/ssefick/R/x86_64-unknown-linux-gnu-library/3.1/RcppArmadillo’

The downloaded source packages are in
‘/tmp/RtmpdYI41j/downloaded_packages’
Warning message:
In install.packages(RcppArmadillo) :
  installation of package ‘RcppArmadillo’ had non-zero exit status


OS: Scientific Linux 6.5

R version 3.1.0 Patched (2014-06-15 r65949)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.utf8   LC_NUMERIC=C
 [3] LC_TIME=en_US.utf8LC_COLLATE=en_US.utf8
 [5] LC_MONETARY=en_US.utf8LC_MESSAGES=en_US.utf8
 [7] LC_PAPER=en_US.utf8   LC_NAME=C
 [9] LC_ADDRESS=C  LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.utf8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base


-- 
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

A big computer, a complex algorithm and a long time does not equal
science.

  -Robert Gentleman

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.


Re: [R] RcppArmadillo compilation errors (Scientific Linux 6.5)

2014-12-03 Thread stephen sefick
solved; sorry for the spam.

library(devtools)
install_github(RcppCore/RcppArmadillo)

On Wed, Dec 3, 2014 at 4:51 PM, stephen sefick ssef...@gmail.com wrote:

 I would appreciate any help that you may be able to give. Please let me
 know if any more information is required.

 I get a the following error when I try to install RcppArmadillo in a
 session started with R --vanilla using the
 install.packages(RcppArmadillo) command.

 make: *** [RcppArmadillo.o] Error 1
 ERROR: compilation failed for package ‘RcppArmadillo’
 * removing
 ‘/home/ssefick/R/x86_64-unknown-linux-gnu-library/3.1/RcppArmadillo’

 The downloaded source packages are in
 ‘/tmp/RtmpdYI41j/downloaded_packages’
 Warning message:
 In install.packages(RcppArmadillo) :
   installation of package ‘RcppArmadillo’ had non-zero exit status


 OS: Scientific Linux 6.5

 R version 3.1.0 Patched (2014-06-15 r65949)
 Platform: x86_64-unknown-linux-gnu (64-bit)

 locale:
  [1] LC_CTYPE=en_US.utf8   LC_NUMERIC=C
  [3] LC_TIME=en_US.utf8LC_COLLATE=en_US.utf8
  [5] LC_MONETARY=en_US.utf8LC_MESSAGES=en_US.utf8
  [7] LC_PAPER=en_US.utf8   LC_NAME=C
  [9] LC_ADDRESS=C  LC_TELEPHONE=C
 [11] LC_MEASUREMENT=en_US.utf8 LC_IDENTIFICATION=C

 attached base packages:
 [1] stats graphics  grDevices utils datasets  methods   base


 --
 Stephen Sefick
 **
 Auburn University
 Biological Sciences
 331 Funchess Hall
 Auburn, Alabama
 36849
 **
 sas0...@auburn.edu
 http://www.auburn.edu/~sas0025
 **

 Let's not spend our time and resources thinking about things that are so
 little or so large that all they really do for us is puff us up and make us
 feel like gods.  We are mammals, and have not exhausted the annoying little
 problems of being mammals.

 -K. Mullis

 A big computer, a complex algorithm and a long time does not equal
 science.

   -Robert Gentleman




-- 
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

A big computer, a complex algorithm and a long time does not equal
science.

  -Robert Gentleman

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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, reproducible code.


[R] R Foundation publish citable Manual for packages

2014-08-06 Thread stephen sefick
Hi all:

I have had recent issues with citing a package(s) in journals. I have a
package that has been cited as the Documentation and accepted into
journals, but I just had a problem with the lme4 package. We are citing the
submitted paper instead of the documentation. In other words, the citation
from the citation function was not acceptable to the editor.

Experiences? Thoughts for a solution? Are there standard ways of doing this?

Maybe the R Foundation could publish a manual of which all package
documentation is a sub-publication kind of like an edited book?

I just am trying to make sure that everyone that makes the R ecosystem so
useful gets attribution for their work.

Many thanks to everyone involved.

-- 
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

A big computer, a complex algorithm and a long time does not equal
science.

  -Robert Gentleman

[[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, reproducible code.


Re: [R] GGPLOT Question

2014-04-06 Thread stephen sefick
add +coord_flip() at the end. Does that do it?


On Sun, Apr 6, 2014 at 7:03 AM, Philip Rhoades p...@pricom.com.au wrote:

 People,

 I have this script:

 library(ggplot2)

 df - read.table(text =  id min max
  Sp1 8.5 13.2
  Sp2 11.7 14.5
  Sp3 14.7 17.7 , header=TRUE)

 ggplot(df) +
  geom_crossbar(aes(ymin = min, ymax = max, x = id, y = min),
  fill = blue, fatten = 0)

 - is there some way to get geom_crossbar to print horizontally? - I
 couldn't find it . . and there doesn't seem to be a horizontal equivalent?

 Thanks,

 Phil.
 --
 Philip Rhoades

 GPO Box 3411
 Sydney NSW  2001
 Australia
 E-mail:  p...@pricom.com.au

 __
 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, reproducible code.




-- 
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

A big computer, a complex algorithm and a long time does not equal
science.

  -Robert Gentleman

[[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, reproducible code.


[R] SL 6.5 R from source; should I update texlive? if yes, how to point configure to new binary.

2014-03-13 Thread stephen sefick
Hello all,

I would like to install R from source on a SL 6.5 box. I have everything I
need except for inconsolata.sty and zi4.sty not found. I am thinking of
installing latex 2013 from https://www.tug.org/texlive/.

The tex binary will be installed in a different folder.

1. How do I tell ./configure to look to this directory for the tex binary?

or

2. Is there something easier that I am overlooking?

I appreciate all of the help.

--Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

A big computer, a complex algorithm and a long time does not equal
science.

  -Robert Gentleman

[[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, reproducible code.


[R] ggplot2; svg; text point size specification

2014-01-10 Thread stephen sefick
library(ggplot2)
a - data.frame(x=rnorm(10), y=rnorm(10))

#conversion of mm to points 2.83464567
plot.demo - qplot(x, y, data=a, xlab=test.x,
ylab=test.y)+theme(panel.border=element_rect(fill=NA, size=1),
axis.title.x = element_text(size=10*2.83464567, family=Arial),
axis.title.y = element_text(size=12*2.83464567, family=Arial),
axis.text.y = element_text(size=10*2.83464567, family=Arial), axis.text.x
= element_text(size=10*2.83464567, family=Arial))

print(plot.demo)

Happy New Year Everyone!

I would like to preserve point size with different figure sizes using the
svg graphics device.

#for instance
#ggsave(~/Desktop/test2.svg, p ,height=3, width=3)
#ggsave(~/Desktop/test2.svg, p ,height=10, width=10)

#both look very different to me. What am I missing? Thank you for all of
the help in advance.

Stephen



-- 
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

A big computer, a complex algorithm and a long time does not equal
science.

  -Robert Gentleman

[[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, reproducible code.


Re: [R] Off-topic? Linux laptop for R

2013-08-11 Thread stephen sefick
I have a gatway running scientific linux 6.4.  It runs R quite well.  I had
an old mac power pc running a special flavor of debian that ran R well
relative to the hardware constraints.

FWIW, get all intel hardware; Then the rest is up to you.  Good Luck!

Stephen


On Sun, Aug 11, 2013 at 4:40 PM, Steve Lianoglou
lianoglou.st...@gene.comwrote:

 Hi,

 I have no real input here from personal experience, but the author of
 the coderspiel blog has these two recent posts about his experience
 with Ubuntu on (what seem to be) two very nice machines:

 The latest is a Vaio Pro of some sort. Ubuntu is a bit difficult to
 install, but doable:

 http://code.technically.us/post/55425026899/vaio-pro-for-programming

 An earlier post talks about the ThinkPad Carbon X1:

 http://code.technically.us/post/50837506478/senistive-touchpads-and-ubuntu

 Which apparently supports ubuntu quite easily (out of the box, I think).

 From quickly skimming, it seems like his only gripe with the X1 is
 that it has a large monitor.

 I can't really imagine why any of these laptops would have a problem
 running R. I agree with what (I think) Rolf is saying in that your
 biggest issue will be to find a laptop that runs your favorite flavor
 of Linux well. Once you satisfy that constraint, I'm relatively sure
 that the chances of running R well is quite high. Whether or not the
 machine can run R well doesn't say much about how easily linux will be
 installed (and fully functional).

 HTH,
 -steve


 On Sun, Aug 11, 2013 at 1:19 PM, Rolf Turner rolf.tur...@xtra.co.nz
 wrote:
 
 
  I think that Hasan Diwan's assertion is a bit of an over-simplification.
  I
  have a Toshiba Satellite
  L850 that has no problems of any sort running R.  However it *does* have
  problems with WiFi.
  The WiFi drivers for my laptop won't work under (any?) Linux system.
  Apparently (I don't completely
  grok the concepts here) this is because the drivers are proprietary and
 so
  Linux developers can't
  get at the code.
 
  My previous laptop (an elderly IBM ThinkPad) had no problems with WiFi,
 at
  least not after I
  upgraded to the then most recent versions of Fedora and later Ubuntu.
 
  I have managed to work around the WiFi problem by using a USB WiFi
 device.
  Be careful,
  but.  The first one I got, an ASUS USB-N10, was advertised to have Linux
  support but
  after much travail (and after having got a great deal of expert advice) I
  decided it was
  no go.  I am currently using an EnGenius EUB9801 which seems to work
  smoothly.  I have
  also ordered a Penguin Wireless G USB Adapter for GNU / Linux from
  ThinkPenguin.com,
  but it hasn't arrived yet.  (Being shipped from the USA to New Zealand.)
  The ThinkPenguin
  people seem to have their heads screwed on right, and answered my inquiry
  promptly,
  thoroughly and comprehensibly.
 
  I hope this is of some relevance to someone!
 
  cheers,
 
  Rolf Turner
 
 
 
  On 12/08/13 06:47, Hasan Diwan wrote:
 
  Any laptop that performs well with Linux will perform acceptably with R
  and
  vice versa. -- H
 
 
  On 11 August 2013 11:03, Mitchell Maltenfort mmal...@gmail.com wrote:
 
  Can anyone recommend a laptop that performs well running R under Linux?
  Thanks.
 
 
  __
  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, reproducible code.



 --
 Steve Lianoglou
 Computational Biologist
 Bioinformatics and Computational Biology
 Genentech

 __
 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, reproducible code.




-- 
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

A big computer, a complex algorithm and a long time does not equal
science.

  -Robert Gentleman

[[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, reproducible code.


Re: [R] PCA and gglot2

2013-07-10 Thread stephen sefick
how about ggbiplot package on github?


On Wed, Jul 10, 2013 at 2:13 PM, John Kane jrkrid...@inbox.com wrote:

 'Sorry I made a mistake .  I was using some data of my own and didn't make
 some key changes to the script to match your variables.


 dat1  -  data.frame(pca1 $scores)  # creates the data.frame
 dat1$items  -  rownames(data1pca1 ) # adds item names
 ggplot(dat1, aes(Comp.1, Comp.2, colour = items)) + geom_point() +
theme(legend.position=none)

 A quick look suggests that this is roughly the same plot as in the example
 Fig 4 but there the author is using geom_segment to add the lines but I
 have not looked at it all that carefully.





 John Kane
 Kingston ON Canada


  -Original Message-
  From: a...@walla.co.il
  Sent: Wed, 10 Jul 2013 11:02:11 -0700 (PDT)
  To: r-help@r-project.org
  Subject: Re: [R] PCA and gglot2
 
  Hi,
 
  Thanks. Fig 4 in the link you provided is what I am looking for.
 
  I still do not know how to implement my data1 and pca1 in the script you
  provided as I think it is only a part of a full script.
  
  data1-read.csv(C:/…/MyPCA.csv)
  pca1 - princomp(data1[,1:4], score=TRUE, cor=TRUE)
  
 
  Am I right, how can I implement my data.frames?
 
  Thanks again
 
 
 
  --
  View this message in context:
  http://r.789695.n4.nabble.com/PCA-and-gglot2-tp4671225p4671237.html
  Sent from the R help mailing list archive at Nabble.com.
 
  __
  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, reproducible code.

 
 FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks  orcas on
 your desktop!

 __
 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, reproducible code.




-- 
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

A big computer, a complex algorithm and a long time does not equal
science.

  -Robert Gentleman

[[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, reproducible code.


Re: [R] PCA and gglot2

2013-07-10 Thread stephen sefick
how about ggbiplot package on github?


On Wed, Jul 10, 2013 at 2:13 PM, John Kane jrkrid...@inbox.com wrote:

 'Sorry I made a mistake .  I was using some data of my own and didn't make
 some key changes to the script to match your variables.


 dat1  -  data.frame(pca1 $scores)  # creates the data.frame
 dat1$items  -  rownames(data1pca1 ) # adds item names
 ggplot(dat1, aes(Comp.1, Comp.2, colour = items)) + geom_point() +
theme(legend.position=none)

 A quick look suggests that this is roughly the same plot as in the example
 Fig 4 but there the author is using geom_segment to add the lines but I
 have not looked at it all that carefully.





 John Kane
 Kingston ON Canada


  -Original Message-
  From: a...@walla.co.il
  Sent: Wed, 10 Jul 2013 11:02:11 -0700 (PDT)
  To: r-help@r-project.org
  Subject: Re: [R] PCA and gglot2
 
  Hi,
 
  Thanks. Fig 4 in the link you provided is what I am looking for.
 
  I still do not know how to implement my data1 and pca1 in the script you
  provided as I think it is only a part of a full script.
  
  data1-read.csv(C:/…/MyPCA.csv)
  pca1 - princomp(data1[,1:4], score=TRUE, cor=TRUE)
  
 
  Am I right, how can I implement my data.frames?
 
  Thanks again
 
 
 
  --
  View this message in context:
  http://r.789695.n4.nabble.com/PCA-and-gglot2-tp4671225p4671237.html
  Sent from the R help mailing list archive at Nabble.com.
 
  __
  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, reproducible code.

 
 FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks  orcas on
 your desktop!

 __
 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, reproducible code.




-- 
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

A big computer, a complex algorithm and a long time does not equal
science.

  -Robert Gentleman

[[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, reproducible code.


Re: [R] merge_recurse in libray reshape - how does it work?

2013-05-31 Thread Stephen Sefick

Thanks for the help.  I think I have it figured out...

inside of merge dfs[-1] lops off the first element in the list and 
merges with dfs[[1]] then this is repeated for the entire list? With 
Recall inside of a function this process repeats until there are no more 
objects to merge?


many thanks,

Stephen

On 05/30/2013 10:02 PM, Dennis Murphy wrote:

For the general purpose of Recall, this might help:

http://rfunction.com/archives/364

It's typically used in recursive function definitions - e.g., the
Fibonacci series.

Dennis

On Thu, May 30, 2013 at 7:57 PM, Stephen Sefick sas0...@auburn.edu wrote:

merge_recurse
function (dfs, ...)
{
 if (length(dfs) == 2) {
 merge(dfs[[1]], dfs[[2]], all = TRUE, sort = FALSE, ...)
 }
 else {
 merge(dfs[[1]], Recall(dfs[-1]), all = TRUE, sort = FALSE,
 ...)
 }
}

I do not understand how the Recall part of this function works.  Could
somebody explain this to me?
many thanks,


--
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

 -K. Mullis

A big computer, a complex algorithm and a long time does not equal
science.

   -Robert Gentleman

__
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, reproducible code.


__
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, reproducible code.


Re: [R] merge_recurse in libray reshape - how does it work?

2013-05-31 Thread stephen sefick
Bert,

I have not studied the help in enough depth.  My, limited, understanding of
recursion comes from the linux command line - e.g., rm -r will remove all
files in a folder by descending (probably not the right word) into the
folder
, removing all of the files, and then removing the folder itself.

Thank you for all of the help.

Stephen


On Thu, May 30, 2013 at 11:25 PM, Bert Gunter gunter.ber...@gene.comwrote:

 Have you studied the Help file for Recall() . (It is not clear to me
 that you have). Do you understand what recursion is? ( this is a
 simple example of it).

 Try constructing a very simple example and then work through what the
 code does in it step by step.

 I'll leave it to others to attempt a mini-tutorial beyond this.

 -- Bert

 On Thu, May 30, 2013 at 7:57 PM, Stephen Sefick sas0...@auburn.edu
 wrote:
  merge_recurse
  function (dfs, ...)
  {
  if (length(dfs) == 2) {
  merge(dfs[[1]], dfs[[2]], all = TRUE, sort = FALSE, ...)
  }
  else {
  merge(dfs[[1]], Recall(dfs[-1]), all = TRUE, sort = FALSE,
  ...)
  }
  }
 
  I do not understand how the Recall part of this function works.  Could
  somebody explain this to me?
  many thanks,
 
 
  --
  Stephen Sefick
  **
  Auburn University
  Biological Sciences
  331 Funchess Hall
  Auburn, Alabama
  36849
  **
  sas0...@auburn.edu
  http://www.auburn.edu/~sas0025
  **
 
  Let's not spend our time and resources thinking about things that are so
  little or so large that all they really do for us is puff us up and make
 us
  feel like gods.  We are mammals, and have not exhausted the annoying
 little
  problems of being mammals.
 
  -K. Mullis
 
  A big computer, a complex algorithm and a long time does not equal
  science.
 
-Robert Gentleman
 
  __
  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, reproducible code.



 --

 Bert Gunter
 Genentech Nonclinical Biostatistics

 Internal Contact Info:
 Phone: 467-7374
 Website:

 http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm




[[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, reproducible code.


[R] tree in tree package - Error: cannot allocate vector of size 2.0 Gb

2013-05-31 Thread Stephen Sefick

R version 3.0.0 (2013-04-03)
Platform: x86_64-redhat-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.utf8   LC_NUMERIC=C
 [3] LC_TIME=en_US.utf8LC_COLLATE=en_US.utf8
 [5] LC_MONETARY=en_US.utf8LC_MESSAGES=en_US.utf8
 [7] LC_PAPER=CLC_NAME=C
 [9] LC_ADDRESS=C  LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.utf8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base


6GB RAM, intel core2 quad, Scientific Linux 6.4

I am using tree in the tree package.  and I get the following error:

Error: cannot allocate vector of size 2.0 Gb

shouldn't I be able to allocate more memory than 2GB?  I am sure that I 
am missing something.  Any help would be greatly appreciated.

kind regards,

--
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so 
little or so large that all they really do for us is puff us up and make 
us feel like gods.  We are mammals, and have not exhausted the annoying 
little problems of being mammals.


-K. Mullis

A big computer, a complex algorithm and a long time does not equal 
science.


  -Robert Gentleman

__
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, reproducible code.


[R] merge_recurse in libray reshape - how does it work?

2013-05-30 Thread Stephen Sefick

merge_recurse
function (dfs, ...)
{
if (length(dfs) == 2) {
merge(dfs[[1]], dfs[[2]], all = TRUE, sort = FALSE, ...)
}
else {
merge(dfs[[1]], Recall(dfs[-1]), all = TRUE, sort = FALSE,
...)
}
}

I do not understand how the Recall part of this function works.  Could 
somebody explain this to me?

many thanks,


--
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so 
little or so large that all they really do for us is puff us up and make 
us feel like gods.  We are mammals, and have not exhausted the annoying 
little problems of being mammals.


-K. Mullis

A big computer, a complex algorithm and a long time does not equal 
science.


  -Robert Gentleman

__
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, reproducible code.


[R] Chron format question h:m not working

2013-05-01 Thread Stephen Sefick

R 2.12.2 on Scientific Linux 6.4

#works
chron(times.=15:00:00, format=c(times=h:m:s))

#doesn't work
chron(times.=15:00, format=c(times=h:m))

From chron Manual:
The times format can be any permutation of h, m, and s separated 
by any one non-special character. The default is h:m:s.


what am I missing?

many thanks,


--
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so 
little or so large that all they really do for us is puff us up and make 
us feel like gods.  We are mammals, and have not exhausted the annoying 
little problems of being mammals.


-K. Mullis

A big computer, a complex algorithm and a long time does not equal 
science.


  -Robert Gentleman

__
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, reproducible code.


Re: [R] Chron format question h:m not working

2013-05-01 Thread stephen sefick
Thanks for the quick replies.  I have this working with a similar
suggestion to what arun suggests.  I am just interested in why the option
to use just h:m isn't supported.

#re: Jeff
chron(dates.=2009/05/01, times.=15:00:00, format=c(dates=c(y/m/d),
times=h:m:s))
chron(dates.=2009/05/01, times.=15:00, format=c(dates=c(y/m/d),
times=h:m))

same outcome.

Does updating to R 3.0.0 solve the problem?

Thanks for all of the help.

Stephen



On Wed, May 1, 2013 at 12:36 PM, arun smartpink...@yahoo.com wrote:

 HI,

 One possible way would be to use paste()
 chron(times.=paste0(15:00,:00),format=c(times=h:m:s))
 #[1] 15:00:00


 #or you could use

 library(lubridate)
 hm(15:00)
 #[1] 15H 0M 0S
 A.K.



 - Original Message -
 From: Stephen Sefick sas0...@auburn.edu
 To: r-help@r-project.org r-help@r-project.org
 Cc:
 Sent: Wednesday, May 1, 2013 12:28 PM
 Subject: [R] Chron format question h:m not working

 R 2.12.2 on Scientific Linux 6.4

 #works
 chron(times.=15:00:00, format=c(times=h:m:s))

 #doesn't work
 chron(times.=15:00, format=c(times=h:m))

 From chron Manual:
 The times format can be any permutation of h, m, and s separated by
 any one non-special character. The default is h:m:s.

 what am I missing?

 many thanks,


 -- Stephen Sefick
 **
 Auburn University
 Biological Sciences
 331 Funchess Hall
 Auburn, Alabama
 36849
 **
 sas0...@auburn.edu
 http://www.auburn.edu/~sas0025
 **

 Let's not spend our time and resources thinking about things that are so
 little or so large that all they really do for us is puff us up and make us
 feel like gods.  We are mammals, and have not exhausted the annoying little
 problems of being mammals.

 -K. Mullis

 A big computer, a complex algorithm and a long time does not equal
 science.

   -Robert Gentleman

 __
 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, reproducible code.


 __
 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, reproducible code.




-- 
Stephen Sefick

| Auburn University   |
| Department of Biological Sciences   |
| 331 Funchess Hall  |
| Auburn, Alabama   |
| 36849|
|___|
| sas0...@auburn.edu |
| http://www.auburn.edu/~sas0025 |
|___|

Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

[[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, reproducible code.


Re: [R] Chron format question h:m not working

2013-05-01 Thread Stephen Sefick
Sorry everybody.  Permutation not selection is the key thing here.  My 
fault.


What date time formats are suggested?

kindest regards,

Stephen

On 05/01/2013 01:21 PM, Enrico Schumann wrote:

On Wed, 01 May 2013, stephen sefick sas0...@auburn.edu writes:


Thanks for the quick replies.  I have this working with a similar
suggestion to what arun suggests.  I am just interested in why the option
to use just h:m isn't supported.

#re: Jeff
chron(dates.=2009/05/01, times.=15:00:00, format=c(dates=c(y/m/d),
times=h:m:s))
chron(dates.=2009/05/01, times.=15:00, format=c(dates=c(y/m/d),
times=h:m))

same outcome.

Does updating to R 3.0.0 solve the problem?


I doubt it: (h, m) is not a _permutation_ of {h, m, s}.


Enrico



Thanks for all of the help.

Stephen






--
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so 
little or so large that all they really do for us is puff us up and make 
us feel like gods.  We are mammals, and have not exhausted the annoying 
little problems of being mammals.


-K. Mullis

A big computer, a complex algorithm and a long time does not equal 
science.


  -Robert Gentleman

__
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, reproducible code.


Re: [R] R web application development

2013-03-18 Thread Stephen Sefick
I can't offer any advice, but I feel like you could probably get a good 
start on this by looking through the archives.


On Mon 18 Mar 2013 06:55:33 PM CDT, John linux-user wrote:


Dear all,

I am wondering if what would be the simple way to develop a simple web 
application that runs R. That is, the web application allows any user 
upload a dataframe as a variable to my web server, a linux-based 
apache, and then run a R package (my package) on the variable that 
should ideally be handled as a variable in memory instead of saving to 
the disk in my server , for security concern. After running, the 
result would be returned to the web. Any suggestion will be appreciated.


Best,

John
[[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, reproducible code.


__
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, reproducible code.


Re: [R] Ggplot2: Moving legend, change fill and removal of space between plots when using grid.arrange() possible use of facet_grid?

2013-03-06 Thread Stephen Sefick
Look at the function melt and use the factor columns as id variables.  
You should be able to do what you want with facet_grid. I have found 
inkscape useful to build legends and modify axes labels.  I know this is 
only a partial answer, but I hope this helps.


Stephen

On Wed 06 Mar 2013 06:32:42 AM CST, Anna Zakrisson wrote:


Hi,

# For publications, I am not allowed to repeat the axes. I have tried to
remove the axes using:
# yaxt=n, but it did not work. I have not understood how to do this in
ggplot2. Can you help me?
# I also do not want loads of space between the graphs (see below script
with Dummy Data).
# If I could make it look like the examples on the (nice) examples page:
# http://www.ling.upenn.edu/~joseff/rstudy/summer2010_ggplot2_intro.html
# using the facet_grid(), I would be very very happy.

# I also do not want the gemoetric points to be filled and the 
fill=white

commande
# does not seem to work - why? and are there alternatives?

#Furthermore, I would like to add legends to inside the plot area 
instead of

on the side. Like when you use plotrix() and brkdn.plot:
legend(topright, c(A, B), pch=c(0,1), bg=white,
lty = 1:2, cex=1, bty=n)
# This did not work in ggplot2. What are my alternatives. I have 
extensively

searched the internet and have I missed something obvious, it was due to
# tiredness and not to lazyness.

# Some dummy data:
mydata- data.frame(factor1 = factor(rep(LETTERS[1:6], each = 80)),
factor2 = factor(rep(c(1:5), each = 16)),
factor3 = factor(rep(c(1:4), each = 4)),
var1 = rnorm(120, mean = rep(c(0, 3, 5), each = 40),
sd = rep(c(1, 2, 3), each = 20)),
var2 = rnorm(120, mean = rep(c(6, 7, 8), each = 40),
sd = rep(c(1, 2, 3), each = 20)))


# Splitting data into 3 data frames (based on factor1)
# If I could do this using for example facet_wrap() or facet_grid(), I 
would

be very
# happy! I have tried but failed that method.

DataAB - mydata[(mydata$factor1) %in% c(A, B), ]
DataCD - mydata[(mydata$factor1) %in% c(C, D), ]
DataEF - mydata[(mydata$factor1) %in% c(E, F), ]
DataAB
library(plyr)
library(ggplot2)

#Plot: levels A and B:
# Summary (means etc)
SummAB - ddply(DataAB, .(factor3,factor1), summarize,
mean = mean(var1, na.rm = FALSE),
sdv = sd(var1, na.rm = FALSE),
se = 1.96*(sd(var1, na.rm=FALSE)/sqrt(length(var1
SummAB
p1 - ggplot(SummAB, aes(factor3, mean,
colour = factor1, group = factor1,
shape = factor1)) +
geom_point(aes(shape=factor(factor1)), color=black, fill=white,
position = dodge, width = 0.3, size=3) +
geom_line(aes(linetype=factor1), color = black, size = 0.5) +
geom_errorbar(aes(ymin = mean - sdv , ymax = mean + sdv), width = 0.3,
position = dodge, color = black, size=0.3) +
theme_bw() +
ylab(expression(paste(my measured stuff))) +
xlab(factor3) + ggtitle() +
labs(color = factor1, shape = factor1, group = factor1,
linetype = factor1)
p1

#Plot: levels C and D:
# Summary (means etc)
SummCD - ddply(DataCD, .(factor3,factor1), summarize,
mean = mean(var1, na.rm = FALSE),
sdv = sd(var1, na.rm = FALSE),
se = 1.96*(sd(var1, na.rm=FALSE)/sqrt(length(var1

p2 - ggplot(SummCD, aes(factor3, mean,
colour = factor1, group = factor1,
shape = factor1)) +
geom_point(aes(shape=factor(factor1)), color=black, fill=white,
position = dodge, width = 0.3, size=3) +
geom_line(aes(linetype=factor1), color = black, size = 0.5) +
geom_errorbar(aes(ymin = mean - sdv , ymax = mean + sdv), width = 0.3,
position = dodge, color = black, size=0.3) +
theme_bw() +
ylab(expression(paste(my measured stuff))) +
xlab(factor3) + ggtitle() +
labs(color = factor1, shape = factor1, group = factor1,
linetype = factor1)
p2

#Plot: levels C and D:
# Summary (means etc)
SummEF - ddply(DataEF, .(factor3,factor1), summarize,
mean = mean(var1, na.rm = FALSE),
sdv = sd(var1, na.rm = FALSE),
se = 1.96*(sd(var1, na.rm=FALSE)/sqrt(length(var1

p3 - ggplot(SummEF, aes(factor3, mean,
colour = factor1, group = factor1,
shape = factor1)) +
geom_point(aes(shape=factor(factor1)), color=black, fill=white, #Why
is the fill commando not working?
position = dodge, width = 0.3, size=3) +
geom_line(aes(linetype=factor1), color = black, size = 0.5) +
geom_errorbar(aes(ymin = mean - sdv , ymax = mean + sdv), width = 0.3,
position = dodge, color = black, size=0.3) +
theme_bw() +
ylab(expression(paste(my measured stuff))) +
xlab(factor3) + ggtitle() +
labs(color = factor1, shape = factor1, group = factor1,
linetype = factor1)
p3

ary(gridExtra)
sidebysideplot - grid.arrange(p1, p2, p3, ncol=2)


Anna Zakrisson Braeunlich
PhD student

Department of Ecology Environment and Plant Sciences
Stockholm University
Svante Arrheniusv. 21A
SE-106 91 Stockholm
Sweden

Lives in Berlin.
For paper mail:
Katzbachstr. 21
D-10965, Berlin - Kreuzberg
Germany/Deutschland

E-mail: anna.zakris...@su.se
Tel work: +49-(0)3091541281
Mobile: +49-(0)15777374888
LinkedIn: http://se.linkedin.com/pub/anna-zakrisson-braeunlich/33/5a2/51b



º`•. . • `•. .• `•. . º`•. . • `•. .•


`•. .º`•. . • 

Re: [R] Code to fetch summary info from vector

2013-01-15 Thread Stephen Sefick
I don't know if I understand what you want.  What are the periods?  I 
suspect this is a time series.  What have you tried that didn't work?

kind regards,

Stephen

On 01/15/2013 10:16 AM, Benjamin Gillespie wrote:

Hi all,

Thanks in advance for any help.

I have a vector b:

b=c(1,1,1,2,3,4,3,2,1,1,1,1,1,2,3,4,5,4,3.5,3,2,1,1,1)

Imagine b is river flow throughout time.

I would like some code that will generate the following information:

number of individual 'periods' where b1 (= 2 in this case)
period 1 length = 5, max = 4
period 2 length = 8, max = 5

I can't figure anything useful out.

Thanks,

Ben Gillespie
Research Postgraduate

School of Geography
University of Leeds
Leeds
LS2 9JT

http://www.geog.leeds.ac.uk/
__
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, reproducible code.


--
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so little 
or so large that all they really do for us is puff us up and make us feel like 
gods.  We are mammals, and have not exhausted the annoying little problems of 
being mammals.

-K. Mullis

A big computer, a complex algorithm and a long time does not equal science.

  -Robert Gentleman

__
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, reproducible code.


Re: [R] subsetting time series

2012-12-13 Thread stephen sefick
Is this a one off or not?  Why not do it manually?  If you need to write a
function some example data would be helpful.


On Thu, Dec 13, 2012 at 10:52 AM, m p mzp3...@gmail.com wrote:

 Hello,
 my series of dates look like

   [1] 2012-05-30 18:30:00 UTC 2012-05-30 19:30:00 UTC
   [3] 2012-05-30 20:30:00 UTC 2012-05-30 21:30:00 UTC
   [5] 2012-05-30 22:30:00 UTC 2012-05-30 23:30:00 UTC
   [7] 2012-05-31 00:30:00 UTC 2012-05-31 01:30:00 UTC
   [9] 2012-05-31 02:30:00 UTC 2012-05-31 00:30:00 UTC
  [11] 2012-05-31 01:30:00 UTC 2012-05-31 02:30:00 UTC
  [13] 2012-05-31 03:30:00 UTC 2012-05-31 04:30:00 UTC
  [15] 2012-05-31 05:30:00 UTC 2012-05-31 06:30:00 UTC
  [17] 2012-05-31 07:30:00 UTC 2012-05-31 08:30:00 UTC
  [19] 2012-05-31 06:30:00 UTC 2012-05-31 07:30:00 UTC
 ...

 I'd like to subset this to four series

 1)
   [1] 2012-05-30 18:30:00 UTC 2012-05-30 19:30:00 UTC
   [3] 2012-05-30 20:30:00 UTC 2012-05-30 21:30:00 UTC
   [5] 2012-05-30 22:30:00 UTC 2012-05-30 23:30:00 UTC
   [7] 2012-05-31 00:30:00 UTC 2012-05-31 01:30:00 UTC
   [9] 2012-05-31 02:30:00 UTC

  [10] 2012-05-31 18:30:00 UTC 2012-05-31 19:30:00 UTC
 ...

 2)
 2012-05-31 00:30:00 UTC
 - [1]
  [11] 2012-05-31 01:30:00 UTC 2012-05-31 02:30:00 UTC - [2,3]
  [13] 2012-05-31 03:30:00 UTC 2012-05-31 04:30:00 UTC
  [15] 2012-05-31 05:30:00 UTC 2012-05-31 06:30:00 UTC
  [17] 2012-05-31 07:30:00 UTC 2012-05-31 08:30:00 UTC

  [10] 2012-06-01 00:30:00 UTC


 3)
  [19] 2012-05-31 06:30:00 UTC 2012-05-31 07:30:00 UTC
 ...

 so that I can plot data for each of the series separately without e.g. data
 at hour  2012-05-31 02:30:00 UTC  connecting in the figure to 2012-05-31
 00:30:00 UTC

 Basically, cycling through the series with period 9

 Thanks for any suggestions/help,
 thanks,

 Mark

 [[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, reproducible code.




-- 
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods.  We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

A big computer, a complex algorithm and a long time does not equal
science.

  -Robert Gentleman

[[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, reproducible code.


[R] source file on startup question - why does an old version of a function show up? ggplot or R?

2012-11-16 Thread Stephen Sefick

All,

1. I will try and make this clear and concise.  Please let me know any 
information that would be helpful in figuring out this problem (I don't 
know the relevant information to post).  I am on linux- see below for 
session information.


2. Problem:
working directory: home

an old version of a function is sourced into the R session and doesn't work

working directory: Desktop

the new version of the function is soured into the R session and works

3. I have setup a R_scripts folder that houses R scripts that I use on a 
regular basis, and I have set up my .Rprofile (below) to source these 
files when R is invoked.


What should I do?

.Rprofile:

###nothing yet###

print(It's go time)

###
#source my R_scripts directory on start up#
###

scripts2source - dir(/home/user/R_scripts, full.names=TRUE)
R_scripts - grep(.*\\.R$, scripts2source)
scripts2source - scripts2source[R_scripts]

for(i in 1:length(scripts2source)){
  source(scripts2source[i])
}

###
###


###
set help_type##
###

options(help_type=html)

###
###



R session:
R version 2.15.2 (2012-10-26)
Platform: x86_64-redhat-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.utf8   LC_NUMERIC=C
 [3] LC_TIME=en_US.utf8LC_COLLATE=en_US.utf8
 [5] LC_MONETARY=en_US.utf8LC_MESSAGES=en_US.utf8
 [7] LC_PAPER=CLC_NAME=C
 [9] LC_ADDRESS=C  LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.utf8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base

other attached packages:
[1] ggplot2_0.9.2.1

loaded via a namespace (and not attached):
 [1] colorspace_1.1-1   dichromat_1.2-4digest_0.5.2   grid_2.15.2
 [5] gtable_0.1.1   labeling_0.1   MASS_7.3-22memoise_0.1
 [9] munsell_0.3plyr_1.7.1 proto_0.3-9.2  
RColorBrewer_1.0-5

[13] reshape2_1.2.1 scales_0.2.2   stringr_0.6.1

--
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so little 
or so large that all they really do for us is puff us up and make us feel like 
gods.  We are mammals, and have not exhausted the annoying little problems of 
being mammals.

-K. Mullis

A big computer, a complex algorithm and a long time does not equal science.

  -Robert Gentleman

__
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, reproducible code.


Re: [R] source file on startup question - why does an old version of a function show up? ggplot or R?

2012-11-16 Thread Stephen Sefick
Nothing like posting to the list to figure it out yourself.  defined the 
little sourcing function in .Rprofile as the .First file.  Now all is 
well.  Sorry for clutering everyones email boxes.

kind regards,

Stephen Sefick

On Fri 16 Nov 2012 08:52:00 AM CST, Stephen Sefick wrote:


All,

1. I will try and make this clear and concise. Please let me know any
information that would be helpful in figuring out this problem (I
don't know the relevant information to post). I am on linux- see below
for session information.

2. Problem:
working directory: home

an old version of a function is sourced into the R session and doesn't
work

working directory: Desktop

the new version of the function is soured into the R session and works

3. I have setup a R_scripts folder that houses R scripts that I use on
a regular basis, and I have set up my .Rprofile (below) to source
these files when R is invoked.

What should I do?

.Rprofile:

###nothing yet###

print(It's go time)

###
#source my R_scripts directory on start up#
###

scripts2source - dir(/home/user/R_scripts, full.names=TRUE)
R_scripts - grep(.*\\.R$, scripts2source)
scripts2source - scripts2source[R_scripts]

for(i in 1:length(scripts2source)){
source(scripts2source[i])
}

###
###


###
set help_type##
###

options(help_type=html)

###
###



R session:
R version 2.15.2 (2012-10-26)
Platform: x86_64-redhat-linux-gnu (64-bit)

locale:
[1] LC_CTYPE=en_US.utf8 LC_NUMERIC=C
[3] LC_TIME=en_US.utf8 LC_COLLATE=en_US.utf8
[5] LC_MONETARY=en_US.utf8 LC_MESSAGES=en_US.utf8
[7] LC_PAPER=C LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.utf8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] ggplot2_0.9.2.1

loaded via a namespace (and not attached):
[1] colorspace_1.1-1 dichromat_1.2-4 digest_0.5.2 grid_2.15.2
[5] gtable_0.1.1 labeling_0.1 MASS_7.3-22 memoise_0.1
[9] munsell_0.3 plyr_1.7.1 proto_0.3-9.2 RColorBrewer_1.0-5
[13] reshape2_1.2.1 scales_0.2.2 stringr_0.6.1

--
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so little 
or so large that all they really do for us is puff us up and make us feel like 
gods.  We are mammals, and have not exhausted the annoying little problems of 
being mammals.

 -K. Mullis

A big computer, a complex algorithm and a long time does not equal science.

   -Robert Gentleman



__
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, reproducible code.


[R] Convert Package Interest?

2012-07-23 Thread Stephen Sefick
I am thinking about submitting a package to CRAN that contains some 
units conversion functions that I use on a regular basis.  Would this be 
helpful to the community, or would it be better to keep this as a 
personal package?  I don't want to clutter CRAN.

many thanks,

--
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so little 
or so large that all they really do for us is puff us up and make us feel like 
gods.  We are mammals, and have not exhausted the annoying little problems of 
being mammals.

-K. Mullis

A big computer, a complex algorithm and a long time does not equal science.

  -Robert Gentleman

__
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, reproducible code.


[R] ggplot2 qplot pch not working anymore

2012-07-17 Thread Stephen Sefick
Is there a way to use a continuous variable to pch in qplot?  I believe 
this worked in previous version.  I need to specify certain values of a 
shape for particular points so that multiple graphs all show the same 
shapes for the same streams.  I have gone to the original data and added 
a pch column that I would like to use to specify the shapes to pch in 
qplot.  Any help would be greatly appreciated.


#example code
a - 1:10
b - 1:10
pch - 1:10

q - data.frame(a,b,pch)

qplot(a,b, pch=pch)

Many thanks,

--
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so little 
or so large that all they really do for us is puff us up and make us feel like 
gods.  We are mammals, and have not exhausted the annoying little problems of 
being mammals.

-K. Mullis

A big computer, a complex algorithm and a long time does not equal science.

  -Robert Gentleman

__
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, reproducible code.


Re: [R] ggplot2 qplot pch not working anymore

2012-07-17 Thread Stephen Sefick
I'm sorry I didn't give the correct code, or explaination;  the 
shape=pch doesn't work anymore.  For example this used to work, but no 
longer can accept continuous values:


#example code
a - 1:10
b - 1:10
pch - 1:10

q - data.frame(a,b,pch)

qplot(a,b, shape=pch)

many thanks,

Stephen Sefick


On 07/17/2012 07:28 PM, Stephen Sefick wrote:
Is there a way to use a continuous variable to pch in qplot?  I 
believe this worked in previous version.  I need to specify certain 
values of a shape for particular points so that multiple graphs all 
show the same shapes for the same streams.  I have gone to the 
original data and added a pch column that I would like to use to 
specify the shapes to pch in qplot.  Any help would be greatly 
appreciated.


#example code
a - 1:10
b - 1:10
pch - 1:10

q - data.frame(a,b,pch)

qplot(a,b, pch=pch)

Many thanks,



--
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so little 
or so large that all they really do for us is puff us up and make us feel like 
gods.  We are mammals, and have not exhausted the annoying little problems of 
being mammals.

-K. Mullis

A big computer, a complex algorithm and a long time does not equal science.

  -Robert Gentleman

__
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, reproducible code.


Re: [R] ggplot2 qplot pch not working anymore

2012-07-17 Thread Stephen Sefick
Dr. Bolker thank you for the help.  I have figured out how to make this 
do what I wanted - re:inline.  I wanted to use the pch variable as the 
number for the R plotting symbol.  I hope that makes more sense.

kindest regards,

Stephen

On Tue 17 Jul 2012 10:31:07 PM CDT, Ben Bolker wrote:

Stephen Sefick sas0025 at auburn.edu writes:



I'm sorry I didn't give the correct code, or explaination;  the
shape=pch doesn't work anymore.  For example this used to work, but no
longer can accept continuous values:

#example code
a - 1:10
b - 1:10
pch - 1:10

q - data.frame(a,b,pch)

qplot(a,b, shape=pch)




if you change  the above line of code to

qplot(a,b, shape=pch)+scale_shape_identity()



   Not entirely clear what you want it to do: how *would* you
map a continuous variable onto shape (assuming you're not
using something like Chernoff faces)?  Does

qplot(a,b,shape=factor(pch,levels=1:10))

do what you want?



I will have a look at these soon.


A couple of possibly useful recent Stack Overflow posts
(URLs broken):

http://stackoverflow.com/questions/10002627/
ggplot2-0-9-0-automatically-dropping-unused-factor-levels-from-plot-legend

http://stackoverflow.com/questions/11361404/
consistent-legend-colors-with-qplot





many thanks,

Stephen Sefick

On 07/17/2012 07:28 PM, Stephen Sefick wrote:

Is there a way to use a continuous variable to pch in qplot?  I
believe this worked in previous version.  I need to specify certain
values of a shape for particular points so that multiple graphs all
show the same shapes for the same streams.  I have gone to the
original data and added a pch column that I would like to use to
specify the shapes to pch in qplot.  Any help would be greatly
appreciated.

#example code
a - 1:10
b - 1:10
pch - 1:10

q - data.frame(a,b,pch)

qplot(a,b, pch=pch)

Many thanks,





__
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, reproducible code.


__
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, reproducible code.


Re: [R] Fitting data and removing outliers

2012-07-13 Thread stephen sefick
Do you have a good reason to throw these points out?

On Fri, Jul 13, 2012 at 2:17 PM, David L Carlson dcarl...@tamu.edu wrote:
 I didn't actually see any question in this posting, but instead of removing 
 the outliers consider using a robust linear model.

 library(MASS)
 ?rlm

 The TeachingDemos package has a data set called outliers to show what can 
 happen when you iteratively remove outliers in the way you suggest.

 -
 David L Carlson
 Associate Professor of Anthropology
 Texas AM University
 College Station, TX 77840-4352


 - Original Message -

 From: Lauren Vogric lvog...@grahamcapital.com
 To: r-help@r-project.org
 Sent: Friday, July 13, 2012 1:36:43 PM
 Subject: [R] Fitting data and removing outliers

 What I'm trying to do is create best fit line in R for a set of data points 
 and then remove all the outliers to re-create a best fit. I can't use IQR 
 because the outliers I have in mind are easily within the range, but way out 
 of line for the best fit, which is ruining the fit. I'd rather throw out 
 those points all together.

 Thanks!

 [[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, reproducible code.

 __
 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, reproducible code.



-- 
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are
so little or so large that all they really do for us is puff us up and
make us feel like gods.  We are mammals, and have not exhausted the
annoying little problems of being mammals.

-K. Mullis

A big computer, a complex algorithm and a long time does not equal science.

  -Robert Gentleman

__
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, reproducible code.


Re: [R] Fitting data and removing outliers

2012-07-13 Thread Stephen Sefick
They are due to measurement error, sample of a different population, or 
... ?  What is the unusual event?  Does it explain something important 
about the system that you are working on?  I am not telling you not to 
do what you are doing, but just writing things that I consider when I am 
doing regression modelling.

FWIW,

Stephen

On 07/13/2012 02:26 PM, Lauren Vogric wrote:

Yes, they are unusual events that occurred that affected my data. They have no 
positive affect in shaping a strong model.

-Original Message-
From: stephen sefick [mailto:ssef...@gmail.com]
Sent: Friday, July 13, 2012 3:24 PM
To: David L Carlson
Cc: Lauren Vogric; r-help@r-project.org
Subject: Re: [R] Fitting data and removing outliers

Do you have a good reason to throw these points out?

On Fri, Jul 13, 2012 at 2:17 PM, David L Carlson dcarl...@tamu.edu wrote:

I didn't actually see any question in this posting, but instead of removing the 
outliers consider using a robust linear model.

library(MASS)
?rlm

The TeachingDemos package has a data set called outliers to show what can happen when you 
iteratively remove outliers in the way you suggest.

-
David L Carlson
Associate Professor of Anthropology
Texas AM University
College Station, TX 77840-4352


- Original Message -

From: Lauren Vogric lvog...@grahamcapital.com
To: r-help@r-project.org
Sent: Friday, July 13, 2012 1:36:43 PM
Subject: [R] Fitting data and removing outliers

What I'm trying to do is create best fit line in R for a set of data points and 
then remove all the outliers to re-create a best fit. I can't use IQR because 
the outliers I have in mind are easily within the range, but way out of line 
for the best fit, which is ruining the fit. I'd rather throw out those points 
all together.

Thanks!

[[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, reproducible code.

__
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, reproducible code.



--
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so little 
or so large that all they really do for us is puff us up and make us feel like 
gods.  We are mammals, and have not exhausted the annoying little problems of 
being mammals.

 -K. Mullis

A big computer, a complex algorithm and a long time does not equal science.

   -Robert Gentleman


__
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, reproducible code.


Re: [R] please help!

2012-05-08 Thread Stephen Sefick
I don't know if we can figure that out...  I would figure out what these 
data are, and then read the relevant help files, ?glm, and literature 
associated with linear modeling.

HTH,

Stephen

On 05/08/2012 01:15 AM, T Bal wrote:

Hi,

I have a data with the forum

a b  c
8.9 0   0
7.4 1   0
4.2 0   1
2.3 1   1


Which are explanatory variables in this data?

And also I want to fit logistic regression model with two explanatory
variables? (I think that I should use glm, but how should I put these
variables in glm)?

Do I need also other functions, other than glm? Please help me. Thanks!

kind regards,
T. Bal

[[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, reproducible code.


--
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so little 
or so large that all they really do for us is puff us up and make us feel like 
gods.  We are mammals, and have not exhausted the annoying little problems of 
being mammals.

-K. Mullis

A big computer, a complex algorithm and a long time does not equal science.

  -Robert Gentleman

__
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, reproducible code.


Re: [R] Help in increasing R memory in unix

2012-05-08 Thread Stephen Sefick
Can you parallelize the code?  It really depends on where the bottle 
neck is.

HTH,

Stephen

On 05/07/2012 10:37 PM, arunkumar wrote:

HI
I've a unix machine which is of 16 GB. when i run any R process it takes
only 2GB of Memory. How to increase Memory limit. It takes a lot of time to
run the process for larger datasets

-
Thanks in Advance
 Arun
--
View this message in context: 
http://r.789695.n4.nabble.com/Help-in-increasing-R-memory-in-unix-tp4616510.html
Sent from the R help mailing list archive at Nabble.com.

__
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, reproducible code.


--
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so little 
or so large that all they really do for us is puff us up and make us feel like 
gods.  We are mammals, and have not exhausted the annoying little problems of 
being mammals.

-K. Mullis

A big computer, a complex algorithm and a long time does not equal science.

  -Robert Gentleman

__
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, reproducible code.


[R] fill a dataframe with zeros where the rows are a smaller subset of a larger dataframe (species by site)

2012-04-25 Thread Stephen Sefick

row - c(a,b,c,d,e,f,g) #rows from larger data frame

row.1 - c(a,b,c,g) #rows of smaller data frame because d, e, 
and f don't contain any of the species, but the zeros are important


x - data.frame(sp1=rnorm(4), sp2=rnorm(4), sp3=rnorm(4), sp4=rnorm(4))

rownames(x) - row.1

#I would like to make z as if I had y, but I only have the rownames of y

y - data.frame(sp1=c(0,0,0), sp2=c(0,0,0), sp3=c(0,0,0), sp4=c(0,0,0))

rownames(y) - c(d, e, f)

z - rbind(x,y)

z - z[order(row.names(z)),]

#I know I am missing something
#many thanks,

--
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so little 
or so large that all they really do for us is puff us up and make us feel like 
gods.  We are mammals, and have not exhausted the annoying little problems of 
being mammals.

-K. Mullis

A big computer, a complex algorithm and a long time does not equal science.

  -Robert Gentleman

__
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, reproducible code.


Re: [R] fill a dataframe with zeros where the rows are a smaller subset of a larger dataframe (species by site)

2012-04-25 Thread Stephen Sefick
I am subsetting a larger data frame that contains macroinverterate 
taxa.  I am subsetting them at different levels of taxonomic 
resolution.  Some of the sites do not have say Tipulidae present, so the 
rows are removed completely for this site.  I would like to fill in the 
sites that were removed during the subsetting and fill these with 0.  I 
have the non-subsetted dataframe which contains all of the sites.  I 
would like to use the sites from this complete data set to expand the 
dataframe that is a subset of the sites in the original.  Is that more 
clear.


Stephen

On Wed 25 Apr 2012 09:13:24 AM CDT, chuck.01 wrote:




--
View this message in context: 
http://r.789695.n4.nabble.com/fill-a-dataframe-with-zeros-where-the-rows-are-a-smaller-subset-of-a-larger-dataframe-species-by-sit-tp4586534p4586711.html

Sent from the R help mailing list archive at Nabble.com.

__
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, reproducible code.
--
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so little 
or so large that all they really do for us is puff us up and make us feel like 
gods.  We are mammals, and have not exhausted the annoying little problems of 
being mammals.

 -K. Mullis

A big computer, a complex algorithm and a long time does not equal science.

   -Robert Gentleman



__
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, reproducible code.


Re: [R] fill a dataframe with zeros where the rows are a smaller subset of a larger dataframe (species by site)

2012-04-25 Thread Stephen Sefick

Thank you all very much, that did the trick.

Stephen

On Wed 25 Apr 2012 09:59:38 AM CDT, Sarah Goslee wrote:

The clarification helps; the original description was rather terse.

What about:


row- c(a,b,c,d,e,f,g) #rows from larger data frame

x- data.frame(sp1=rnorm(4), sp2=rnorm(4), sp3=rnorm(4), sp4=rnorm(4))

rownames(x)- row.1

merge(x, matrix(row, ncol=1), by.x=0, by.y=1, all=TRUE)

   Row.namessp1sp2sp3sp4
1 a  0.4964272  1.4989159  0.4302415  0.9648854
2 b  1.4137142  0.9430609  0.0728391 -0.6275084
3 c -0.8103023 -1.3375148 -0.3799518  0.4523287
4 d NA NA NA NA
5 e NA NA NA NA
6 f NA NA NA NA
7 g -0.1914184  0.5156566  0.5626614  0.8068154

Sarah

On Wed, Apr 25, 2012 at 10:42 AM, Stephen Seficksas0...@auburn.edu  wrote:

I am subsetting a larger data frame that contains macroinverterate taxa.  I
am subsetting them at different levels of taxonomic resolution.  Some of the
sites do not have say Tipulidae present, so the rows are removed completely
for this site.  I would like to fill in the sites that were removed during
the subsetting and fill these with 0.  I have the non-subsetted dataframe
which contains all of the sites.  I would like to use the sites from this
complete data set to expand the dataframe that is a subset of the sites in
the original.  Is that more clear.

Stephen



--
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are 
so little or so large that all they really do for us is puff us up and 
make us feel like gods.  We are mammals, and have not exhausted the 
annoying little problems of being mammals.


   -K. Mullis

A big computer, a complex algorithm and a long time does not equal 
science.


 -Robert Gentleman

__
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, reproducible code.


Re: [R] lm()

2012-04-23 Thread Stephen Sefick
Rpart has a built in cross-validation proceedure.  the xerror and so on 
are based on a ten fold cross validation, I believe.  Read the manual 
for more results.  If you plot the fit with post and then look at the 
postscript file it should have a misclassification rate under the 
terminal nodes.

HTH,

Stephen

On Mon 23 Apr 2012 02:58:37 AM CDT, Mariam wrote:

Hi, Jorge!
Help me please! I made a classification tree (rpart package) according to my 
train data and set of variables. How can I validate my test data? I want to 
check if the test data will classified properly by the same tree. Thanks
cheers
Maria


Tue, 10 Apr 2012 08:44:39 -0700 (PDT) от Jorge I Velez [via 
R]ml-node+s789695n4546022...@n4.nabble.com:


  Hi Mariam,

Check out the ?poly function.

Best,
Jorge.-


On Tue, Apr 10, 2012 at 10:12 AM, Mariam  wrote:


People, help me please!
How to use lm() function to defind a cofficient for 7-polinom, and what
expression should I put in /formula/

--
View this message in context:
http://r.789695.n4.nabble.com/lm-tp4545740p4545740.html
Sent from the R help mailing list archive at Nabble.com.

__
[hidden email] 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, reproducible code.


        [[alternative HTML version deleted]]

__
[hidden email] 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, reproducible code.



--


If you reply to this email, your message will be added to the discussion below: 
http://r.789695.n4.nabble.com/lm-tp4545740p4546022.html
  To unsubscribe from lm(), click here.
  NAML


--
View this message in context: 
http://r.789695.n4.nabble.com/lm-tp4545740p4579717.html
Sent from the R help mailing list archive at Nabble.com.
[[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, reproducible code.


--
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are 
so little or so large that all they really do for us is puff us up and 
make us feel like gods.  We are mammals, and have not exhausted the 
annoying little problems of being mammals.


   -K. Mullis

A big computer, a complex algorithm and a long time does not equal 
science.


 -Robert Gentleman

__
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, reproducible code.


Re: [R] Principal Component Analysis

2012-02-29 Thread Stephen Sefick
x - data.frame(a=rnorm(100), b=rnorm(100), d=rnorm(100))

prcomp(x, scale=T)
prcomp(scale(x), scale=F)

The above will give you the same thing.  This should be the case because 
the correlation matrix is the same as the covariance of the scaled and 
centered original data.

FWIW

Stephen


On 02/29/2012 08:52 AM, Blaz Simcic wrote:
 Dear R buddies,
 IâEUR^(TM)m trying to run Principal Component Analysis, package
 princomp: 
 http://stat.ethz.ch/R-manual/R-patched/library/stats/html/princomp.html.
 My question is: why do I get different results with pca =
 princomp (x, cor = TRUE) and pca = princomp (x, cor = FALSE) even when I
 standardize variables in my matrix?
 Best regards,
 Blaž SimÄ?iÄ?
   [[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, reproducible code.

-- 
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so little 
or so large that all they really do for us is puff us up and make us feel like 
gods.  We are mammals, and have not exhausted the annoying little problems of 
being mammals.

 -K. Mullis

A big computer, a complex algorithm and a long time does not equal science.

   -Robert Gentleman



[[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, reproducible code.


Re: [R] Cleaning up messy Excel data

2012-02-28 Thread Stephen Sefick
Just replace that value with zero.  If you provide some reproducible 
code I could probably give you a solution.

?dput
good luck,

Stephen

On 02/28/2012 03:27 PM, Noah Silverman wrote:

Unfortunately, some data I need to work with was delivered in a rather messy 
Excel file.  I want to import into R and clean up some things so that I can do 
my analysis.  Pulling in a CSV from Excel is the easy part.

My current challenge is dealing with some text mixed in the values.
i.e.   118   5.72.0  3.7

Since this column in Excel has a 2.0 value, then R reads the column as a factor with 
levels.  Ideally, I want to convert it a normal vector of scalars and code code the 2.0 
as 0.

Can anyone suggest an easy way to do this?

Thanks!


--
Noah Silverman
UCLA Department of Statistics
8117 Math Sciences Building
Los Angeles, CA 90095


[[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, reproducible code.


--
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so little 
or so large that all they really do for us is puff us up and make us feel like 
gods.  We are mammals, and have not exhausted the annoying little problems of 
being mammals.

-K. Mullis

A big computer, a complex algorithm and a long time does not equal science.

  -Robert Gentleman

__
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, reproducible code.


[R] 4th corner analysis ade4 - what do the colors mean

2012-01-20 Thread Stephen Sefick
I have used the fourthcorner function as suggest by dray and legendre 
(model 2 and 4 then combine).  I plot the combined value with 
plot(four.comb, type=G).  What do the colors mean?  I have both grey 
and black bars.

many thanks,

Stephen

--
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so little 
or so large that all they really do for us is puff us up and make us feel like 
gods.  We are mammals, and have not exhausted the annoying little problems of 
being mammals.

-K. Mullis

A big computer, a complex algorithm and a long time does not equal science.

  -Robert Gentleman

__
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, reproducible code.


Re: [R] add data to a file while doing a loop

2012-01-06 Thread Stephen Sefick
Without context, read reproducible code, it is hard to answer this 
question.  What system are you on?  Do you need to write one line of 
data or a data frame or a list out?  Are trying to write a graphic out? 
It will be easier to answer your question with some context.  Good 
luck!


Stephen

On Fri 06 Jan 2012 05:49:01 AM CST, Joao Fadista wrote:

Hi,

I would like to know how can I keep adding data to a file while doing a loop 
and without deleting the data of the previous iteration. Thanks.

__
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, reproducible code.


__
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, reproducible code.


Re: [R] help me....

2011-12-17 Thread Stephen Sefick

This definatley looks like homework.

On Sat 17 Dec 2011 05:36:03 AM CST, jurassic85 wrote:

Life times of one brand of light bulb were observed. Life hours of nine light
bulbs were 898, 720, 354, 405, 620, 54, 229, 306, 890. There were three more
light bulbs that were still burning after 1000 hours. It is common to assume
the life time of a light bulb follows an exponential distribution. With the
observed data find the MLE of the parameter of the exponential distribution
with EM algorithm.

I dont know how I make a R-code...

--
View this message in context: 
http://r.789695.n4.nabble.com/help-me-tp4207987p4207987.html
Sent from the R help mailing list archive at Nabble.com.

__
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, reproducible code.


--
Stephen Sefick
**
Auburn University 
Biological Sciences  
331 Funchess Hall   
Auburn, Alabama
36849   
**
sas0...@auburn.edu  
http://www.auburn.edu/~sas0025 
**


Let's not spend our time and resources thinking about things that are 
so little or so large that all they really do for us is puff us up and 
make us feel like gods.  We are mammals, and have not exhausted the 
annoying little problems of being mammals.


   -K. Mullis

A big computer, a complex algorithm and a long time does not equal 
science.


 -Robert Gentleman

__
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, reproducible code.


Re: [R] PCA on high dimentional data

2011-12-10 Thread Stephen Sefick
By doing PCA you are trying to find a lower dimensional representation 
of the major variation structure in your data.  You get PC* to represent 
the new data.  If you want to know what loads on the axes then you 
need to look at the loadings.  These are the link between the original 
data and the new data.  Maybe you need to read up on what PCA does?  
Or, maybe I am misunderstanding your question...

FWIW


Stephen

On Sat 10 Dec 2011 09:56:35 AM CST, mail me wrote:


Hi:

I have a large dataset mydata, of 1000 rows and 1000 columns. The rows
have gene names and columns have condition names (cond1, cond2, cond3,
etc).

mydata- read.table(file=c:/file1.mtx, header=TRUE, sep=)

I applied PCA as follows:

data_after_pca- prcomp(mydata, retx=TRUE, center=TRUE, scale.=TRUE);

Now i get 1000 PCs and i choose first three PCs and make a new data frame

new_data_frame- cbind(data_after_pca$x[,1], data_after_pca$x[,2],
data_after_pca$x[,3]);

After the PCA, in the new_data_frame, i loose the previous cond1,
cond2, cond3 labels, and instead have PC1, PC2, PC3 as column names.

My question is, is there any way I can map the PC1, PC2, PC3 to the
original conditions, so that i can still have a reference to original
condition labels after PCA?

Thanks:
deb

__
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, reproducible code.
--
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so little 
or so large that all they really do for us is puff us up and make us feel like 
gods.  We are mammals, and have not exhausted the annoying little problems of 
being mammals.

 -K. Mullis

A big computer, a complex algorithm and a long time does not equal science.

   -Robert Gentleman



__
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, reproducible code.


Re: [R] Regression Models

2011-12-10 Thread Stephen Sefick

regsubsets in leaps

glmnet has lasso etc. too

On Sat 10 Dec 2011 09:54:16 AM CST, JeffND wrote:

So your question is about fitting a regression model for all the subsets of
predictors? Then there would be
2^13 submodesl?

Probably leaps() does what you want. This function does a all-subset
regresion.



--
View this message in context: 
http://r.789695.n4.nabble.com/Regression-Models-tp4173278p4180447.html
Sent from the R help mailing list archive at Nabble.com.

__
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, reproducible code.


--
Stephen Sefick
**
Auburn University 
Biological Sciences  
331 Funchess Hall   
Auburn, Alabama
36849   
**
sas0...@auburn.edu  
http://www.auburn.edu/~sas0025 
**


Let's not spend our time and resources thinking about things that are 
so little or so large that all they really do for us is puff us up and 
make us feel like gods.  We are mammals, and have not exhausted the 
annoying little problems of being mammals.


   -K. Mullis

A big computer, a complex algorithm and a long time does not equal 
science.


 -Robert Gentleman

__
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, reproducible code.


[R] Partitioning Around Mediods then rpart to follow - is this sensible

2011-12-02 Thread Stephen Sefick

The problem:  There are no a priori groupings to run a classification on

My solution:

This is a non-R code question, so I appreciate any thoughts.  I have 
used pam in the cluster package proceeded by sillohouette to find the 
optimum number of clusters on scaled and centered data.  I have followed 
this by a classification tree analysis with rpart to discern which 
variables drive the clustering on the original data.  Is this a sensible 
approach?

many thanks,

Stephen Sefick

__
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, reproducible code.


[R] Cp -Inf

2011-11-22 Thread Stephen Sefick

Hello All:

I am using the leaps package on scale and centered data for an 
exhaustive search.  There are Cp values of -Inf being returned for all 
models.  I was going to look at the source before contacting the list, 
but it has been a while since I have looked under the hood.  There are 
.rdb and .rdx files where I expected the source files to be.  I am sure 
that I have over looked something.  I can provide data and code if it is 
needed.


Stephen

__
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, reproducible code.


[R] grep fixed (?) in 2.14

2011-11-03 Thread Stephen Sefick
#This is probably due to my incomplete understanding of grep, but the 
below code has been working for some time to
#search for .R with anything in front of it and return a list of scripts 
to source.  Likely, the syntax for the

#grep statement has been wrong all along.

scripts2source - (c(/home/ssefick/R_scripts/Convert_package.R, 
/home/ssefick/R_scripts/Convert_R_CODE,

/home/ssefick/R_scripts/CV.R, /home/ssefick/R_scripts/cvs.out.R,
/home/ssefick/R_scripts/database_connect, 
/home/ssefick/R_scripts/database_connect_package.R,

/home/ssefick/R_scripts/exit_db.R, /home/ssefick/R_scripts/exit.R,
/home/ssefick/R_scripts/hourly_zoo.R, 
/home/ssefick/R_scripts/model_diag.R,
/home/ssefick/R_scripts/not_numeric.R, 
/home/ssefick/R_scripts/num_ecol_package.R,
/home/ssefick/R_scripts/NumEcolR_scripts, 
/home/ssefick/R_scripts/old_scripts_DELETE_AFTER_DECEMBER,
/home/ssefick/R_scripts/only_numeric_dataframe.R, 
/home/ssefick/R_scripts/only_numeric.R,
/home/ssefick/R_scripts/PCA.ve.R, 
/home/ssefick/R_scripts/poster_ggplot2_theme.R,
/home/ssefick/R_scripts/pressure_transducer_package.R, 
/home/ssefick/R_scripts/Pressure_Transducer_R_CODE,
/home/ssefick/R_scripts/publication_ggplot2_theme.R, 
/home/ssefick/R_scripts/r2test.R,
/home/ssefick/R_scripts/recession_constant_package.R, 
/home/ssefick/R_scripts/recession_constant_R_CODE,
/home/ssefick/R_scripts/serdp_name_split.R, 
/home/ssefick/R_scripts/setup_R.R,

/home/ssefick/R_scripts/USGS.R))

scripts2source[grep(*.R, scripts2source)]

#here is my problem;  I would like these to be removed.
scripts2source[c(2,5,13,14,20,24)]

#Thanks for all of your help in advance
#kindest regards,

#Stephen Sefick

__
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, reproducible code.


Re: [R] grep fixed (?) in 2.14

2011-11-03 Thread Stephen Sefick
That did the trick.  I have read about regular expressions often, and 
sometimes I get them right and sometimes I don't.  Is there a good 
reference resource that anyone could suggest?  Thanks for all of the help.


Stephen Sefick



On 11/03/2011 08:03 AM, jim holtman wrote:

your syntax is wrong, you need:

  scripts2source[grep(*\\.R$, scripts2source)]

Notice the '\\.' to escape the special meaning of '.', and the $ to
anchor to the end of the line.


On Thu, Nov 3, 2011 at 8:54 AM, Stephen Seficksas0...@auburn.edu  wrote:

#This is probably due to my incomplete understanding of grep, but the below
code has been working for some time to
#search for .R with anything in front of it and return a list of scripts to
source.  Likely, the syntax for the
#grep statement has been wrong all along.

scripts2source- (c(/home/ssefick/R_scripts/Convert_package.R,
/home/ssefick/R_scripts/Convert_R_CODE,
/home/ssefick/R_scripts/CV.R, /home/ssefick/R_scripts/cvs.out.R,
/home/ssefick/R_scripts/database_connect,
/home/ssefick/R_scripts/database_connect_package.R,
/home/ssefick/R_scripts/exit_db.R, /home/ssefick/R_scripts/exit.R,
/home/ssefick/R_scripts/hourly_zoo.R,
/home/ssefick/R_scripts/model_diag.R,
/home/ssefick/R_scripts/not_numeric.R,
/home/ssefick/R_scripts/num_ecol_package.R,
/home/ssefick/R_scripts/NumEcolR_scripts,
/home/ssefick/R_scripts/old_scripts_DELETE_AFTER_DECEMBER,
/home/ssefick/R_scripts/only_numeric_dataframe.R,
/home/ssefick/R_scripts/only_numeric.R,
/home/ssefick/R_scripts/PCA.ve.R,
/home/ssefick/R_scripts/poster_ggplot2_theme.R,
/home/ssefick/R_scripts/pressure_transducer_package.R,
/home/ssefick/R_scripts/Pressure_Transducer_R_CODE,
/home/ssefick/R_scripts/publication_ggplot2_theme.R,
/home/ssefick/R_scripts/r2test.R,
/home/ssefick/R_scripts/recession_constant_package.R,
/home/ssefick/R_scripts/recession_constant_R_CODE,
/home/ssefick/R_scripts/serdp_name_split.R,
/home/ssefick/R_scripts/setup_R.R,
/home/ssefick/R_scripts/USGS.R))

scripts2source[grep(*.R, scripts2source)]

#here is my problem;  I would like these to be removed.
scripts2source[c(2,5,13,14,20,24)]

#Thanks for all of your help in advance
#kindest regards,

#Stephen Sefick

__
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, reproducible code.






__
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, reproducible code.


  1   2   3   4   5   6   7   8   9   >