Re: [R] Problems installing IsoriX package in R

2017-05-05 Thread Jeff Newmiller
If by "this problem" you mean the error "no package named x" then yes. It means 
you need to find the "proxy" package or find an updated version of the package 
that required the "proxy" package.

Since it is on CRAN [1], it might be as simple as installing the package, or 
your preferred mirror might not have it so you might have to pick another one. 

[1] https://cran.r-project.org/package=proxy
-- 
Sent from my phone. Please excuse my brevity.

On May 5, 2017 9:39:23 AM PDT, Victoria Dominguez Almela 
 wrote:
>Hi everyone!
>
>I am trying to build an isoscape using R, but I am having issues when
>comes to install the IsoriX package.
>
>The next message comes through:
>
>Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()),
>versionCheck = vI[[j]]) :
>there is no package called �proxy�
>
>Has anyone faced this problem before??
>
>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] Problems installing IsoriX package in R

2017-05-05 Thread Victoria Dominguez Almela
Hi everyone!

I am trying to build an isoscape using R, but I am having issues when comes to 
install the IsoriX package.

The next message comes through:

Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = 
vI[[j]]) :
there is no package called �proxy�

Has anyone faced this problem before??

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.

Re: [ESS] Ever consider changing indentation on #?

2017-05-05 Thread Steven McKinney
As an old lisp programmer I use # and ## and ### in all my code.

### 
### for code block and function headers
### (this was actually functional in 
###  SPLUS for auto-generating help)
### 

## for inline comments in code, and   # brief margin notes

I find it useful, but all things change over time.


Steven McKinney


> -Original Message-
> From: ESS-help [mailto:ess-help-boun...@r-project.org] On Behalf Of Paul
> Johnson
> Sent: May-04-17 7:50 PM
> To: ess-help
> Subject: Re: [ESS] Ever consider changing indentation on #?
> 
> Please raise your hand if you have EVER used # to document R code in
> the way mentioned on the LISP coding standards page.
> 
> pj
> 
> On Thu, May 4, 2017 at 10:52 AM, Brahm, David
>  wrote:
> > Since we're on the topic, is there a style to make the # comments right-
> justified against
> > "fill-column" (which is 97 for me, as that makes printouts look good)
> and/or the window
> > width?  So as you type the comment, it marches leftward.  E.g.:
> >
> > x <- y + z   # This
> comment ends on column 97
> >
> 123456789012345678901234567890123456789012345678901234567890123456789012345
> 6789012345678901234567
> >
> > -- David Brahm (br...@alum.mit.edu)
> >
> >
> > -Original Message-
> > From: ESS-help [mailto:ess-help-boun...@r-project.org] On Behalf Of
> Charles C. Berry
> > Sent: Thursday, May 04, 2017 11:38 AM
> > To: Ista Zahn
> > Cc: Stephen Eglen; ess-help
> > Subject: Re: [ESS] Ever consider changing indentation on #?
> >
> > On Thu, 4 May 2017, Ista Zahn wrote:
> >
> >> On Thu, May 4, 2017 at 10:25 AM, Lionel Henry 
> wrote:
> >>>
>  On 4 mai 2017, at 16:22, Paul Johnson  wrote:
> 
>  I understand I can fix my init.el go avoid this, but it would be nicer
>  for my purpose
>  if this were in ESS itself, because I keep telling students to use it
>  and they are put off/discouraged
>  by this.
> >>>
> >>> Emacs is for people willing to put the effort into customisation.
> >>> Your students are probably better off with RStudio. That said
> >>> I agree that good defaults are important.
> >>
> >
> > And there are a bunch of styles from which to choose a personal default.
> > See below.
> >
> >> Yes, IMO Emacs/ESS isn't going to compete with Rstudio on
> >> out-of-the-box convenience. But we can compete on features! Put this
> >> in your config file
> >>
> >> (add-hook 'ess-mode-hook
> >>  (lambda()
> >>;; don't indent comments
> >>(setq ess-indent-with-fancy-comments nil)
> >>;; turn on outline mode
> >>(setq-local outline-regexp "[# ]+")
> >>(outline-minor-mode t)))
> >>
> >> and not only will single # comments not be aligned at comment-column,
> >> but code folder will work too!
> >>
> >>
> >
> > There are `off-the-shelf' styles like `Rstudio' that might satisfy Paul's
> > student.
> >
> > Setting `ess-default-style' to `Rstudio' gives these settings:
> >
> >   (RStudio
> >(ess-indent-offset . 2)
> >(ess-offset-arguments . open-delim)
> >(ess-offset-arguments-newline . prev-line)
> >(ess-offset-block . prev-line)
> >(ess-offset-continued . straight)
> >(ess-align-nested-calls)
> >(ess-align-arguments-in-calls "function[ ]*(")
> >(ess-align-continuations-in-calls)
> >(ess-align-blocks)
> >(ess-indent-from-lhs arguments)
> >(ess-indent-from-chain-start . t)
> >(ess-indent-with-fancy-comments))
> >
> >
> > Or one can customize the `OWN' style and select it. See the
> > `ess-style-alist' docstring for more details.
> >
> > HTH,
> >
> > Chuck
> >
> > __
> > ESS-help@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/ess-help
> >
> > __
> > ESS-help@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/ess-help
> 
> 
> 
> --
> Paul E. Johnson   http://pj.freefaculty.org
> Director, Center for Research Methods and Data Analysis http://crmda.ku.edu
> 
> To write to me directly, please address me at pauljohn at ku.edu.
> 
> __
> ESS-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help

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


Re: [R] Formatting column displays

2017-05-05 Thread Bruce Ratner PhD
Thanks, Bill. 
Bruce

__




> On May 5, 2017, at 5:54 PM, William Dunlap  wrote:
> 
> Use Google: a search for "R Reporter package" shows that the package is named 
> "ReporteRs".
> 
> Bill Dunlap
> TIBCO Software
> wdunlap tibco.com
> 
>> On Fri, May 5, 2017 at 2:50 PM, BR_email  wrote:
>> Jeff:
>> I cannot install the ReporteR package. Is there a work-around, or is the 
>> error message correct?
>> Thanks. Bruce
>> 
>> R> install.packages("ReporteR") Installing package into 
>> ‘C:/Users/BruceRatner/Documents/R/win-library/3.3’ (as ‘lib’ is unspecified) 
>> Warning in install.packages :
>>   package ‘ReporteR’ is not available (for R version 3.3.3)
>> 
>> 
>>  
>> Jeff Newmiller wrote:
>>> Data frames are primarily data storage objects, not data display objects. 
>>> You can create a separate version of your data frame with formatted text 
>>> strings, but what you usually really want is to handle column alignment as 
>>> well and that really has to be addressed as part of your data output 
>>> process, which you have said nothing about.
>>> 
>>> Do you know about HTML or markdown or LaTeX? These are useful formats for 
>>> creating reproducible research, and they are well supported through the 
>>> knitr package and in RStudio via Rnw and Rmd files. Tables in particular 
>>> are well supported via LaTeX with the tables package.  The ReporteR package 
>>> can output to Microsoft Word files directly with various formatting 
>>> options, but it doesn't play well with the other tools.
>> 
>> __
>> 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-es] Tengo duda de que Modelo utilizar.... Puedo usar Modelos GAM?

2017-05-05 Thread Javier Marcuzzi
Estimada Miselly Lopez

Lo que usted desea es posible, hay varias formas, pero como regla en esta lista 
no se responden temas que son muy generales o a su pregunta sobre que variables 
son adecuadas, si usted tiene un trabajo en R puede enviar la pregunta 
específica, pero esta lista no es sustituta de profesores universitarios, tiene 
otra función, sin embargo si tiene un problema en R no dude en consultar sobre 
el lenguaje.

Javier Rubén Marcuzzi
Veterinario

De: MISELLY LOPEZ
Enviado: viernes, 5 de mayo de 2017 8:01
Para: r-help-es@r-project.org
Asunto: [R-es] Tengo duda de que Modelo utilizar Puedo usar Modelos GAM?

Buenos dias, deseo realizar una proyección acerca del precios de pollo, y
ademas de ello realizar una comparación entre varios paises. es posible
realizar esto con moodelos gam? y que variables puedo tomar

-- 
*Miselly López Pérez*
*Estudiante Zootecnia*
*Universidad De Antioquia *
*3113615300*

[[alternative HTML version deleted]]

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es


[[alternative HTML version deleted]]

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es


Re: [R] I cannot run R.EXE or RSCRIPT.EXE

2017-05-05 Thread John C Frain
As far as I can recall this is and always was a  "feature" of MS Windows.
Filenames with embedded spaces must be within double quotes. Single quotes
can not be used. I understand that single quotes had or may still have some
meaning in "for" statements in a batch file. I have never had occasion to
use this feature and I suspect that most if not all R users will not need
it.  Added the R bin directory to your path will bypass all these problems.

[[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] Formatting column displays

2017-05-05 Thread William Dunlap via R-help
Use Google: a search for "R Reporter package" shows that the package is
named "ReporteRs".

Bill Dunlap
TIBCO Software
wdunlap tibco.com

On Fri, May 5, 2017 at 2:50 PM, BR_email  wrote:

> Jeff:
> I cannot install the ReporteR package. Is there a work-around, or is the
> error message correct?
> Thanks. Bruce
>
> R> install.packages("ReporteR") Installing package into
> ‘C:/Users/BruceRatner/Documents/R/win-library/3.3’ (as ‘lib’ is
> unspecified) Warning in install.packages :
>   package ‘ReporteR’ is not available (for R version 3.3.3)
>
>
>
> Jeff Newmiller wrote:
>
>> Data frames are primarily data storage objects, not data display objects.
>> You can create a separate version of your data frame with formatted text
>> strings, but what you usually really want is to handle column alignment as
>> well and that really has to be addressed as part of your data output
>> process, which you have said nothing about.
>>
>> Do you know about HTML or markdown or LaTeX? These are useful formats for
>> creating reproducible research, and they are well supported through the
>> knitr package and in RStudio via Rnw and Rmd files. Tables in particular
>> are well supported via LaTeX with the tables package.  The ReporteR package
>> can output to Microsoft Word files directly with various formatting
>> options, but it doesn't play well with the other tools.
>>
>
> __
> 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/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Re: [R] Formatting column displays

2017-05-05 Thread BR_email

Jeff:
I cannot install the ReporteR package. Is there a work-around, or is the 
error message correct?

Thanks. Bruce

R> install.packages("ReporteR") Installing package into 
‘C:/Users/BruceRatner/Documents/R/win-library/3.3’ (as ‘lib’ is 
unspecified) Warning in install.packages :

  package ‘ReporteR’ is not available (for R version 3.3.3)


 


Jeff Newmiller wrote:

Data frames are primarily data storage objects, not data display objects. You 
can create a separate version of your data frame with formatted text strings, 
but what you usually really want is to handle column alignment as well and that 
really has to be addressed as part of your data output process, which you have 
said nothing about.

Do you know about HTML or markdown or LaTeX? These are useful formats for 
creating reproducible research, and they are well supported through the knitr 
package and in RStudio via Rnw and Rmd files. Tables in particular are well 
supported via LaTeX with the tables package.  The ReporteR package can output 
to Microsoft Word files directly with various formatting options, but it 
doesn't play well with the other tools.


__
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] loading edited functions already in saved workspace automatically

2017-05-05 Thread Bert Gunter
Haven't followed this closely, but
?Startup
and links therein might be useful (esp .First).

Bert


On May 5, 2017 11:47 AM, "David Winsemius"  wrote:


> On May 5, 2017, at 7:48 AM, Michael Dewey  wrote:
>
> Dear Ralf
>
> You can manually save it with
> savehistory(insertyour preferred filenamehere.r)
>
> or does that not do what you hoped?

Or you can exit to your system browser and copy of the desired sections of
the .Rhistory file that you desire archiving to a text editor (after you
find the ofttimes hidden file.) It's just a text file.

The details vary across OSes. I don't think you told us yours. Might help
to read the Posting Guide.

--
David


>
> On 05/05/2017 14:44, Ralf Goertz wrote:
>> Am Fri, 05 May 2017 06:30:01 -0700
>> schrieb Jeff Newmiller :
>>
>>> The answer most people seem to use is to avoid depending on functions
>>> in RData files, and in particular avoiding ever saving the
>>> "automatic" ".RData" files at all. (Some people avoid using any RData
>>> files, but the automatic loading of functions by ".RData" files is a
>>> particularly pernicious source of evil as you have already
>>> discovered.)
>>>
>>> That is,  always work toward building scripts that you run to restore
>>> your workspace rather than depending on save files. Don't depend on
>>> save files to keep track of what you do interactively. This also
>>> usually means that there should be little if anything in
>>> your .Rprofile because that tends to build non-reproducibility into
>>> your scripts.
>>
>> Hi Jeff,
>>
>> thanks for your answer. Actually, I don't use the workspace saving
>> feature primarily for the data but for the command line history. Is
>> there a way to just save .Rhistory?
>>
>> Ralf
>>
>> __
>> 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.
>>
>> ---
>> This email has been checked for viruses by AVG.
>> http://www.avg.com
>>
>>
>
> --
> Michael
> http://www.dewey.myzen.co.uk/home.html
>
> __
> 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.

David Winsemius
Alameda, CA, USA

__
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] loading edited functions already in saved workspace automatically

2017-05-05 Thread David Winsemius

> On May 5, 2017, at 7:48 AM, Michael Dewey  wrote:
> 
> Dear Ralf
> 
> You can manually save it with
> savehistory(insertyour preferred filenamehere.r)
> 
> or does that not do what you hoped?

Or you can exit to your system browser and copy of the desired sections of the 
.Rhistory file that you desire archiving to a text editor (after you find the 
ofttimes hidden file.) It's just a text file. 

The details vary across OSes. I don't think you told us yours. Might help to 
read the Posting Guide.

-- 
David


> 
> On 05/05/2017 14:44, Ralf Goertz wrote:
>> Am Fri, 05 May 2017 06:30:01 -0700
>> schrieb Jeff Newmiller :
>> 
>>> The answer most people seem to use is to avoid depending on functions
>>> in RData files, and in particular avoiding ever saving the
>>> "automatic" ".RData" files at all. (Some people avoid using any RData
>>> files, but the automatic loading of functions by ".RData" files is a
>>> particularly pernicious source of evil as you have already
>>> discovered.)
>>> 
>>> That is,  always work toward building scripts that you run to restore
>>> your workspace rather than depending on save files. Don't depend on
>>> save files to keep track of what you do interactively. This also
>>> usually means that there should be little if anything in
>>> your .Rprofile because that tends to build non-reproducibility into
>>> your scripts.
>> 
>> Hi Jeff,
>> 
>> thanks for your answer. Actually, I don't use the workspace saving
>> feature primarily for the data but for the command line history. Is
>> there a way to just save .Rhistory?
>> 
>> Ralf
>> 
>> __
>> 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.
>> 
>> ---
>> This email has been checked for viruses by AVG.
>> http://www.avg.com
>> 
>> 
> 
> -- 
> Michael
> http://www.dewey.myzen.co.uk/home.html
> 
> __
> 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.

David Winsemius
Alameda, CA, USA

__
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] I cannot run R.EXE or RSCRIPT.EXE

2017-05-05 Thread Bos, Roger
Dominik,

Folders with spaces can be very tricky sometimes.  In my case single quotes 
didn't work, but double quotes did (see my example below).  Adding the full 
path to your PATH variable with eliminate the need to specify the full path, 
making it much easier.

Thanks,

Roger


Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\bosr>C:\Program Files\R\R-3.3.3\bin\R.exe
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\bosr>'C:\Program Files\R\R-3.3.3\bin\R.exe'
The filename, directory name, or volume label syntax is incorrect.

C:\Users\bosr>"C:\Program Files\R\R-3.3.3\bin\R.exe"

R version 3.3.3 (2017-03-06) -- "Another Canoe"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)



-Original Message-
From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Duncan Murdoch
Sent: Friday, May 05, 2017 6:01 AM
To: Dominik Szewczyk; r-help@r-project.org
Subject: Re: [R] I cannot run R.EXE or RSCRIPT.EXE

On 04/05/2017 4:08 PM, Dominik Szewczyk wrote:
> I cannot run R.EXE or RSCRIPT.EXE. It produces this error:
>
>
> 'C:\Program' is not recognized as an internal or external command,
> operable program or batch file.
>
>
> I have attempted to put quotes around the full path including the executable 
> and also running the exectuable from within the path itself with the same 
> result. The only way I can do this is to move the installation from 
> C:\Program Files\R\R-3.4.0 to C:\R\..
>
>
> Is this a limitation of the program itself?

It sounds like a limitation of the way you're trying to run them, which you 
haven't told us.

Duncan Murdoch

__
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.



This message and any attachments are for the intended recipient’s use only. 
This message may contain confidential, proprietary or legally privileged 
information. No right to confidential or privileged treatment of this message 
is waived or lost by an error in transmission.
If you have received this message in error, please immediately notify the 
sender by e-mail, delete the message, any attachments and all copies from your 
system and destroy any hard copies. You must not, directly or indirectly, use, 
disclose, distribute, print or copy any part of this message or any attachments 
if you are not the intended recipient.




__
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] Formatting column displays

2017-05-05 Thread Bruce Ratner PhD
Ulrike: Thanks for the afterthought. 
I'll let you know if I'm successful. 
Thanks, again. 
Bruce

__




> On May 5, 2017, at 10:55 AM, Ulrik Stervbo  wrote:
> 
> Hi Bruce,
> 
> while working with data I would not touch the formatting of the columns. If 
> knowing the units is important, you can add it to the column name rather than 
> the values of the columns.
> 
> For presentation purposes - where everything is turned into strings - it is a 
> different story. Once you are done with your calculations, you can format 
> everything the way you like it. I find kable() from the knitr package to help 
> a lot with basic formatting, though you might have to do a little 
> pre-processing by hand (and here sprintf comes in handy). 
> 
> And to echo Jeff: you should use Rmarkdown if you are writing up reports and 
> it is well integrated with Rstudio. knitr works behind the scenes, and I 
> believe it can even create a Microsoft Word document though pandoc, without 
> the need for ReporteR (but I have never tried, so I might be wrong).
> 
> Best,
> Ulrik
> 
>> On Fri, 5 May 2017 at 15:26 Bruce Ratner PhD  wrote:
>> Jeff: Thanks for reply. I will follow your lead.
>> Thanks.
>> Bruce
>> 
>> __
>> 
>> 
>> 
>> > On May 5, 2017, at 9:15 AM, Jeff Newmiller  
>> > wrote:
>> >
>> > Data frames are primarily data storage objects, not data display objects. 
>> > You can create a separate version of your data frame with formatted text 
>> > strings, but what you usually really want is to handle column alignment as 
>> > well and that really has to be addressed as part of your data output 
>> > process, which you have said nothing about.
>> >
>> > Do you know about HTML or markdown or LaTeX? These are useful formats for 
>> > creating reproducible research, and they are well supported through the 
>> > knitr package and in RStudio via Rnw and Rmd files. Tables in particular 
>> > are well supported via LaTeX with the tables package.  The ReporteR 
>> > package can output to Microsoft Word files directly with various 
>> > formatting options, but it doesn't play well with the other tools.
>> > --
>> > Sent from my phone. Please excuse my brevity.
>> >
>> >> On May 5, 2017 5:08:19 AM PDT, Bruce Ratner PhD  wrote:
>> >> R-helpers:
>> >> I need some references for formatting the display of my data frame
>> >> columns.
>> >> Any guidance will be appreciated. Bruce
>> >> ~~
>> >> I have a date frame with one column as an integer for which I want a
>> >> comma display,
>> >> one column consisting of dollar amounts, one column for which I want a
>> >> display to two digits after the decimal point, and one column as
>> >> integers ranging between
>> >> 100 - 999.
>> >>
>> >> __
>> >> 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] Formatting column displays

2017-05-05 Thread Ulrik Stervbo
Hi Bruce,

while working with data I would not touch the formatting of the columns. If
knowing the units is important, you can add it to the column name rather
than the values of the columns.

For presentation purposes - where everything is turned into strings - it is
a different story. Once you are done with your calculations, you can format
everything the way you like it. I find kable() from the knitr package to
help a lot with basic formatting, though you might have to do a little
pre-processing by hand (and here sprintf comes in handy).

And to echo Jeff: you should use Rmarkdown if you are writing up reports
and it is well integrated with Rstudio. knitr works behind the scenes, and
I believe it can even create a Microsoft Word document though pandoc,
without the need for ReporteR (but I have never tried, so I might be wrong).

Best,
Ulrik

On Fri, 5 May 2017 at 15:26 Bruce Ratner PhD  wrote:

> Jeff: Thanks for reply. I will follow your lead.
> Thanks.
> Bruce
>
> __
>
>
>
> > On May 5, 2017, at 9:15 AM, Jeff Newmiller 
> wrote:
> >
> > Data frames are primarily data storage objects, not data display
> objects. You can create a separate version of your data frame with
> formatted text strings, but what you usually really want is to handle
> column alignment as well and that really has to be addressed as part of
> your data output process, which you have said nothing about.
> >
> > Do you know about HTML or markdown or LaTeX? These are useful formats
> for creating reproducible research, and they are well supported through the
> knitr package and in RStudio via Rnw and Rmd files. Tables in particular
> are well supported via LaTeX with the tables package.  The ReporteR package
> can output to Microsoft Word files directly with various formatting
> options, but it doesn't play well with the other tools.
> > --
> > Sent from my phone. Please excuse my brevity.
> >
> >> On May 5, 2017 5:08:19 AM PDT, Bruce Ratner PhD  wrote:
> >> R-helpers:
> >> I need some references for formatting the display of my data frame
> >> columns.
> >> Any guidance will be appreciated. Bruce
> >> ~~
> >> I have a date frame with one column as an integer for which I want a
> >> comma display,
> >> one column consisting of dollar amounts, one column for which I want a
> >> display to two digits after the decimal point, and one column as
> >> integers ranging between
> >> 100 - 999.
> >>
> >> __
> >> 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] loading edited functions already in saved workspace automatically

2017-05-05 Thread Michael Dewey

Dear Ralf

You can manually save it with
savehistory(insertyour preferred filenamehere.r)

or does that not do what you hoped?

On 05/05/2017 14:44, Ralf Goertz wrote:

Am Fri, 05 May 2017 06:30:01 -0700
schrieb Jeff Newmiller :


The answer most people seem to use is to avoid depending on functions
in RData files, and in particular avoiding ever saving the
"automatic" ".RData" files at all. (Some people avoid using any RData
files, but the automatic loading of functions by ".RData" files is a
particularly pernicious source of evil as you have already
discovered.)

That is,  always work toward building scripts that you run to restore
your workspace rather than depending on save files. Don't depend on
save files to keep track of what you do interactively. This also
usually means that there should be little if anything in
your .Rprofile because that tends to build non-reproducibility into
your scripts.


Hi Jeff,

thanks for your answer. Actually, I don't use the workspace saving
feature primarily for the data but for the command line history. Is
there a way to just save .Rhistory?

Ralf

__
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.

---
This email has been checked for viruses by AVG.
http://www.avg.com




--
Michael
http://www.dewey.myzen.co.uk/home.html

__
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] I cannot run R.EXE or RSCRIPT.EXE

2017-05-05 Thread Richard M. Heiberger
Try the 8.3 version of the path name.

   dir /w

if I remember correctly.
"Program files" will become progra~1


On Fri, May 5, 2017 at 06:46 Michael Dewey  wrote:

> Dear Dominik
>
> Try this
> Open a command window
> Type PATH
> Does the path to where R has stored its executables appear on the PATH?
>
> Either way get back to us with more details.
>
> On 05/05/2017 11:01, Duncan Murdoch wrote:
> > On 04/05/2017 4:08 PM, Dominik Szewczyk wrote:
> >> I cannot run R.EXE or RSCRIPT.EXE. It produces this error:
> >>
> >>
> >> 'C:\Program' is not recognized as an internal or external command,
> >> operable program or batch file.
> >>
> >>
> >> I have attempted to put quotes around the full path including the
> >> executable and also running the exectuable from within the path itself
> >> with the same result. The only way I can do this is to move the
> >> installation from C:\Program Files\R\R-3.4.0 to C:\R\..
> >>
> >>
> >> Is this a limitation of the program itself?
> >
> > It sounds like a limitation of the way you're trying to run them, which
> > you haven't told us.
> >
> > Duncan Murdoch
> >
> > __
> > 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.
> >
> > ---
> > This email has been checked for viruses by AVG.
> > http://www.avg.com
> >
> >
>
> --
> Michael
> http://www.dewey.myzen.co.uk/home.html
>
> __
> 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] loading edited functions already in saved workspace automatically

2017-05-05 Thread Jeff Newmiller
Read ?history.

Seems somewhat platform dependent, but they ARE different. 
-- 
Sent from my phone. Please excuse my brevity.

On May 5, 2017 7:23:14 AM PDT, Ralf Goertz  wrote:
>Am Fri, 05 May 2017 07:14:36 -0700
>schrieb Jeff Newmiller :
>
>> R normally prompts you to save .RData, but it just automatically
>> saves .Rhistory... the two are unrelated. 
>
>Not here. If I say "n" to the prompted question "Save workspace image?
>[y/n/c]: " my history doesn't get saved.
>
>Version:
>
>R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
>Copyright (C) 2016 The R Foundation for Statistical Computing
>Platform: x86_64-suse-linux-gnu (64-bit)

__
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] loading edited functions already in saved workspace automatically

2017-05-05 Thread Ralf Goertz
Am Fri, 05 May 2017 07:14:36 -0700
schrieb Jeff Newmiller :

> R normally prompts you to save .RData, but it just automatically
> saves .Rhistory... the two are unrelated. 

Not here. If I say "n" to the prompted question "Save workspace image?
[y/n/c]: " my history doesn't get saved.

Version:

R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-suse-linux-gnu (64-bit)

__
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] loading edited functions already in saved workspace automatically

2017-05-05 Thread Jeff Newmiller
R normally prompts you to save .RData, but it just automatically saves 
.Rhistory... the two are unrelated. 
-- 
Sent from my phone. Please excuse my brevity.

On May 5, 2017 6:44:50 AM PDT, Ralf Goertz  wrote:
>Am Fri, 05 May 2017 06:30:01 -0700
>schrieb Jeff Newmiller :
>
>> The answer most people seem to use is to avoid depending on functions
>> in RData files, and in particular avoiding ever saving the
>> "automatic" ".RData" files at all. (Some people avoid using any RData
>> files, but the automatic loading of functions by ".RData" files is a
>> particularly pernicious source of evil as you have already
>> discovered.)
>> 
>> That is,  always work toward building scripts that you run to restore
>> your workspace rather than depending on save files. Don't depend on
>> save files to keep track of what you do interactively. This also
>> usually means that there should be little if anything in
>> your .Rprofile because that tends to build non-reproducibility into
>> your scripts.
>
>Hi Jeff,
>
>thanks for your answer. Actually, I don't use the workspace saving
>feature primarily for the data but for the command line history. Is
>there a way to just save .Rhistory?
>
>Ralf

__
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] Non-Linear Regression Help

2017-05-05 Thread J C Nash

If you insist on using nls() for anything that you don't understand
extremely well, you will end up with frustration. nls() uses the same
method K F Gauss used (with good understanding of the details) over
200 years ago. The Gauss-Newton approach inside works very well and
efficiently for problems where the assumptions are met, and terribly
most other times. But nls() does have some nice "extras", and rather
than rewrite all the code, we have a wrapnls() function for the codes
in the much more modern nlsr package. It tries (and mostly succeeds) in
getting analytic derivatives in cases like this. Note that nls(), when
you output the diagnostic, tells you that it is having trouble with
the numeric derivative.

I did the following:

1) made a csv file from the data in the posting (Shadomy17.csv)

2) edited the nls() call and added trace and try()

3) ran nlxb() from nlsr. Note that it uses a lot of iterations -- the
problem is quite close to singular. The singular values have NOTHING
to do with the individual parameters. Their display position is just
convenient. Together they show that the ratio of largest / smallest sv
(a measure of the condition number) is very large -- an ill-conditioned
problem. Now we know this -- there's no guessing and hand-waving.

Best, JN

Here's the (rather verbose) output


> library(nlsr)

> shadomy <- read.csv("./Shadomy17.csv")

> power.nls<-try(nls(discharge~C*(stage+a)^n, data=shadomy, start=list(C=4, 
a=0, n=1), trace=TRUE))
7585285 :  4 0 1

> print(power.nls)
[1] "Error in numericDeriv(form[[3L]], names(ind), env) : \n  Missing value or an infinity produced when evaluating the 
model\n"

attr(,"class")
[1] "try-error"
attr(,"condition")


> tmp <- readline("Try a better approach")

> p.nlxb <- nlxb(discharge~C*(stage+a)^n, data=shadomy, start=list(C=4, a=0, 
n=1), trace=TRUE)
formula: discharge ~ C * (stage + a)^n
lower:[1] -Inf -Inf -Inf
upper:[1] Inf Inf Inf
$watch
[1] FALSE

$phi
[1] 1

$lamda
[1] 1e-04

$offset
[1] 100

$laminc
[1] 10

$lamdec
[1] 4

$femax
[1] 1

$jemax
[1] 5000

$rofftest
[1] TRUE

$smallsstest
[1] TRUE

vn:[1] "discharge" "C" "stage" "a" "n"
Finished masks check
datvar:[1] "discharge" "stage"
Data variable  discharge :[1] 2592.05  559.58  484.22  494.75  456.08  291.13
Data variable  stage :[1] 6.53 6.32 5.96 4.99 3.66 0.51
trjfn:
function (prm)
{
if (is.null(names(prm)))
names(prm) <- names(pvec)
localdata <- list2env(as.list(prm), parent = data)
eval(residexpr, envir = localdata)
}


no weights
lower:[1] -Inf -Inf -Inf
upper:[1] Inf Inf Inf
Start:lamda: 1e-04  SS= 7585285  at  C = 4  a = 0  n = 1  1 / 0
lamda: 0.001  SS= Inf  at  C = -843.56  a = 228.63  n = 123.33  2 / 1
lamda: 0.01  SS= Inf  at  C = -515.08  a = 148.03  n = 84.714  3 / 1
lamda: 0.1  SS= 9.0129e+100  at  C = -50.129  a = 37.016  n = 29.648  4 / 1
lamda: 1  SS= 8.5013e+47  at  C = 58.103  a = 30.986  n = 13.954  5 / 1
lamda: 10  SS= 4.2141e+31  at  C = 49.209  a = 45.025  n = 8.0734  6 / 1
lamda: 100  SS= 9.4088e+10  at  C = 17.369  a = 15.101  n = 2.9571  7 / 1
< print(p.nlxb)
nlsr object: x
residual sumsquares =  2468891  on  6 observations
after  31Jacobian and  51 function evaluations
  namecoeff  SE   tstat  pval  gradient
JSingval
C17.2692  1404 0.0123  0.991  -733.5
4112
a  -0.509779 60.67  -0.008403 0.9938   35772   
188.7
n2.44601 31.750.07704 0.9434 -126335  
0.6456

> sink()





On 2017-05-04 06:58 PM, Zachary Shadomy wrote:

I am having some errors come up in my first section of code. I have no
issue in plotting the points. Is there an easier method for creating a
non-linear regression using C*(x+a)^n. The .txt file is named
stage_discharge with the two variables being stage and discharge.
The data is a relatively small file listed below:

stage discharge
6.53 2592.05
6.32 559.5782
5.96 484.2151
4.99 494.7527
3.66 456.0778
0.51 291.13






power.nls<-nls(stage_dischargee$discharge~C*(stage_discharge$stage+a)^n,

data=stage_discharge, start=list(C=4, a=0, n=1))

C<-coef(power.nls)["C"]
a<-coef(power.nls)["a"]
n<-coef(power.nls)["n"]
plot(stage_discharge$stage, stage_discharge$discharge, pch=17, cex=1.25,

ylab='Discharge (cfs )', xlab='Stage (ft)', font.lab=2, main='Boone Creek\n
St age-Discharge Curve')

curve(C*(x+a)^n, add=TRUE, col="red")


[[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 

Re: [R] loading edited functions already in saved workspace automatically

2017-05-05 Thread Ralf Goertz
Am Fri, 05 May 2017 06:30:01 -0700
schrieb Jeff Newmiller :

> The answer most people seem to use is to avoid depending on functions
> in RData files, and in particular avoiding ever saving the
> "automatic" ".RData" files at all. (Some people avoid using any RData
> files, but the automatic loading of functions by ".RData" files is a
> particularly pernicious source of evil as you have already
> discovered.)
> 
> That is,  always work toward building scripts that you run to restore
> your workspace rather than depending on save files. Don't depend on
> save files to keep track of what you do interactively. This also
> usually means that there should be little if anything in
> your .Rprofile because that tends to build non-reproducibility into
> your scripts.

Hi Jeff,

thanks for your answer. Actually, I don't use the workspace saving
feature primarily for the data but for the command line history. Is
there a way to just save .Rhistory?

Ralf

__
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] loading edited functions already in saved workspace automatically

2017-05-05 Thread Jeff Newmiller
The answer most people seem to use is to avoid depending on functions in RData 
files, and in particular avoiding ever saving the "automatic" ".RData" files at 
all. (Some people avoid using any RData files, but the automatic loading of 
functions by ".RData" files is a particularly pernicious source of evil as you 
have already discovered.)

That is,  always work toward building scripts that you run to restore your 
workspace rather than depending on save files. Don't depend on save files to 
keep track of what you do interactively. This also usually means that there 
should be little if anything in your .Rprofile because that tends to build 
non-reproducibility into your scripts.
-- 
Sent from my phone. Please excuse my brevity.

On May 5, 2017 1:33:27 AM PDT, Ralf Goertz  wrote:
>Hi,
>
>In short: Is it possible to have the previously saved workspace
>restored
>and nevertheless load a function already existing in this workspace via
>.Rprofile anyway?
>
>In detail: I use different directories for different projects. In all
>those projects I use a function which I therefore try to get into the
>session by `myfunc=eval(parse(file=("~/R/myfunc.R")))' in ~/.Rprofile.
>Once I leave the session thereby saving the workspace this function
>gets
>saved in ./.RData as well. In a subsequent session in that directory it
>gets loaded back. However, in the meantime I might have edited
>~/R/myfunc.R. I don't seem to be able to automatically load the new
>function into the session. The workspace gets loaded *after* the
>execution of ~/.Rprofile. So the new definition of myfunc() gets
>overwritten by the old one. I can't use .First() – which is executed
>after loading the workspace – because this would load myfunc() into the
>environment of .First() instead of the global environment. I could use
>.Last() to remove the function before saving the workspace. But then
>.Last() gets saved to the workspace which is also not convenient since
>when I add another function the same way and edit the definition of
>.Last() in ~/.Rprofile to also remove that function this does not work
>because I don't get the new .Last() into the session automatically. And
>no, removing .Last() from within .Last() doesn't work.
>
>__
>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.

Re: [R] Formatting column displays

2017-05-05 Thread Bruce Ratner PhD
Jeff: Thanks for reply. I will follow your lead. 
Thanks. 
Bruce

__



> On May 5, 2017, at 9:15 AM, Jeff Newmiller  wrote:
> 
> Data frames are primarily data storage objects, not data display objects. You 
> can create a separate version of your data frame with formatted text strings, 
> but what you usually really want is to handle column alignment as well and 
> that really has to be addressed as part of your data output process, which 
> you have said nothing about. 
> 
> Do you know about HTML or markdown or LaTeX? These are useful formats for 
> creating reproducible research, and they are well supported through the knitr 
> package and in RStudio via Rnw and Rmd files. Tables in particular are well 
> supported via LaTeX with the tables package.  The ReporteR package can output 
> to Microsoft Word files directly with various formatting options, but it 
> doesn't play well with the other tools.
> -- 
> Sent from my phone. Please excuse my brevity.
> 
>> On May 5, 2017 5:08:19 AM PDT, Bruce Ratner PhD  wrote:
>> R-helpers:
>> I need some references for formatting the display of my data frame
>> columns. 
>> Any guidance will be appreciated. Bruce
>> ~~
>> I have a date frame with one column as an integer for which I want a
>> comma display, 
>> one column consisting of dollar amounts, one column for which I want a
>> display to two digits after the decimal point, and one column as
>> integers ranging between 
>> 100 - 999.
>> 
>> __
>> 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.


Re: [R] Formatting column displays

2017-05-05 Thread Bruce Ratner PhD
Ulrik: Thanks for reply. I obviously new to R, so I feel if the output on the 
console looks right I'm half way through my problem. I know it's not WYSIWYG, 
but it's a quasi start. 
Thanks. 
Bruce

__



> On May 5, 2017, at 8:56 AM, Ulrik Stervbo  wrote:
> 
> Hi Bruce,
> 
> display as in the console or as a table for presentation?
> 
> For the latter, look at sprintf:
> 
> sprintf("%,1f", 1)
> sprintf("%.2f", 2.5678)
> sprintf("$%.3f", 2.5678)
> 
> HTH
> Ulrik
> 
>> On Fri, 5 May 2017 at 14:08 Bruce Ratner PhD  wrote:
>> R-helpers:
>> I need some references for formatting the display of my data frame columns.
>> Any guidance will be appreciated. Bruce
>> ~~
>> I have a date frame with one column as an integer for which I want a comma 
>> display,
>> one column consisting of dollar amounts, one column for which I want a 
>> display to two digits after the decimal point, and one column as integers 
>> ranging between
>> 100 - 999.
>> 
>> __
>> 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] Formatting column displays

2017-05-05 Thread Jeff Newmiller
Data frames are primarily data storage objects, not data display objects. You 
can create a separate version of your data frame with formatted text strings, 
but what you usually really want is to handle column alignment as well and that 
really has to be addressed as part of your data output process, which you have 
said nothing about. 

Do you know about HTML or markdown or LaTeX? These are useful formats for 
creating reproducible research, and they are well supported through the knitr 
package and in RStudio via Rnw and Rmd files. Tables in particular are well 
supported via LaTeX with the tables package.  The ReporteR package can output 
to Microsoft Word files directly with various formatting options, but it 
doesn't play well with the other tools.
-- 
Sent from my phone. Please excuse my brevity.

On May 5, 2017 5:08:19 AM PDT, Bruce Ratner PhD  wrote:
>R-helpers:
>I need some references for formatting the display of my data frame
>columns. 
>Any guidance will be appreciated. Bruce
>~~
>I have a date frame with one column as an integer for which I want a
>comma display, 
>one column consisting of dollar amounts, one column for which I want a
>display to two digits after the decimal point, and one column as
>integers ranging between 
>100 - 999.
>
>__
>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.


Re: [R] Formatting column displays

2017-05-05 Thread Ulrik Stervbo
Hi Bruce,

display as in the console or as a table for presentation?

For the latter, look at sprintf:

sprintf("%,1f", 1)
sprintf("%.2f", 2.5678)
sprintf("$%.3f", 2.5678)

HTH
Ulrik

On Fri, 5 May 2017 at 14:08 Bruce Ratner PhD  wrote:

> R-helpers:
> I need some references for formatting the display of my data frame columns.
> Any guidance will be appreciated. Bruce
> ~~
> I have a date frame with one column as an integer for which I want a comma
> display,
> one column consisting of dollar amounts, one column for which I want a
> display to two digits after the decimal point, and one column as integers
> ranging between
> 100 - 999.
>
> __
> 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] Formatting column displays

2017-05-05 Thread Bruce Ratner PhD
R-helpers:
I need some references for formatting the display of my data frame columns. 
Any guidance will be appreciated. Bruce
~~
I have a date frame with one column as an integer for which I want a comma 
display, 
one column consisting of dollar amounts, one column for which I want a display 
to two digits after the decimal point, and one column as integers ranging 
between 
100 - 999.

__
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] I cannot run R.EXE or RSCRIPT.EXE

2017-05-05 Thread Michael Dewey

Dear Dominik

Try this
Open a command window
Type PATH
Does the path to where R has stored its executables appear on the PATH?

Either way get back to us with more details.

On 05/05/2017 11:01, Duncan Murdoch wrote:

On 04/05/2017 4:08 PM, Dominik Szewczyk wrote:

I cannot run R.EXE or RSCRIPT.EXE. It produces this error:


'C:\Program' is not recognized as an internal or external command,
operable program or batch file.


I have attempted to put quotes around the full path including the
executable and also running the exectuable from within the path itself
with the same result. The only way I can do this is to move the
installation from C:\Program Files\R\R-3.4.0 to C:\R\..


Is this a limitation of the program itself?


It sounds like a limitation of the way you're trying to run them, which
you haven't told us.

Duncan Murdoch

__
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.

---
This email has been checked for viruses by AVG.
http://www.avg.com




--
Michael
http://www.dewey.myzen.co.uk/home.html

__
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] I cannot run R.EXE or RSCRIPT.EXE

2017-05-05 Thread Duncan Murdoch

On 04/05/2017 4:08 PM, Dominik Szewczyk wrote:

I cannot run R.EXE or RSCRIPT.EXE. It produces this error:


'C:\Program' is not recognized as an internal or external command,
operable program or batch file.


I have attempted to put quotes around the full path including the executable 
and also running the exectuable from within the path itself with the same 
result. The only way I can do this is to move the installation from C:\Program 
Files\R\R-3.4.0 to C:\R\..


Is this a limitation of the program itself?


It sounds like a limitation of the way you're trying to run them, which 
you haven't told us.


Duncan Murdoch

__
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] Non-Linear Regression Help

2017-05-05 Thread PIKAL Petr
Hi

I am not an expert in nonlinear regression, but your data seems to be rather 
weird. Last five points has almost linear relationship, the first one is 
several times higher. If there is no error in your data, I doubt that you can 
model it by power equation.

Cheers
Petr



> -Original Message-
> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Zachary
> Shadomy
> Sent: Friday, May 5, 2017 12:58 AM
> To: r-help@r-project.org
> Subject: [R] Non-Linear Regression Help
>
> I am having some errors come up in my first section of code. I have no
> issue in plotting the points. Is there an easier method for creating a
> non-linear regression using C*(x+a)^n. The .txt file is named
> stage_discharge with the two variables being stage and discharge.
> The data is a relatively small file listed below:
>
> stage discharge
> 6.53 2592.05
> 6.32 559.5782
> 5.96 484.2151
> 4.99 494.7527
> 3.66 456.0778
> 0.51 291.13
>
>
>
>
>
> > power.nls<-
> nls(stage_dischargee$discharge~C*(stage_discharge$stage+a)^n,
> data=stage_discharge, start=list(C=4, a=0, n=1))
> > C<-coef(power.nls)["C"]
> > a<-coef(power.nls)["a"]
> > n<-coef(power.nls)["n"]
> > plot(stage_discharge$stage, stage_discharge$discharge, pch=17, cex=1.25,
> ylab='Discharge (cfs )', xlab='Stage (ft)', font.lab=2, main='Boone Creek\n
> St age-Discharge Curve')
> > curve(C*(x+a)^n, add=TRUE, col="red")
>
>   [[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.


Tento e-mail a jakékoliv k němu připojené dokumenty jsou důvěrné a jsou určeny 
pouze jeho adresátům.
Jestliže jste obdržel(a) tento e-mail omylem, informujte laskavě neprodleně 
jeho odesílatele. Obsah tohoto emailu i s přílohami a jeho kopie vymažte ze 
svého systému.
Nejste-li zamýšleným adresátem tohoto emailu, nejste oprávněni tento email 
jakkoliv užívat, rozšiřovat, kopírovat či zveřejňovat.
Odesílatel e-mailu neodpovídá za eventuální škodu způsobenou modifikacemi či 
zpožděním přenosu e-mailu.

V případě, že je tento e-mail součástí obchodního jednání:
- vyhrazuje si odesílatel právo ukončit kdykoliv jednání o uzavření smlouvy, a 
to z jakéhokoliv důvodu i bez uvedení důvodu.
- a obsahuje-li nabídku, je adresát oprávněn nabídku bezodkladně přijmout; 
Odesílatel tohoto e-mailu (nabídky) vylučuje přijetí nabídky ze strany příjemce 
s dodatkem či odchylkou.
- trvá odesílatel na tom, že příslušná smlouva je uzavřena teprve výslovným 
dosažením shody na všech jejích náležitostech.
- odesílatel tohoto emailu informuje, že není oprávněn uzavírat za společnost 
žádné smlouvy s výjimkou případů, kdy k tomu byl písemně zmocněn nebo písemně 
pověřen a takové pověření nebo plná moc byly adresátovi tohoto emailu případně 
osobě, kterou adresát zastupuje, předloženy nebo jejich existence je adresátovi 
či osobě jím zastoupené známá.

This e-mail and any documents attached to it may be confidential and are 
intended only for its intended recipients.
If you received this e-mail by mistake, please immediately inform its 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.
__
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, 

Re: [R] How do I use R to build a dictionary of proper nouns?

2017-05-05 Thread Boris Steipe
Did you try using the table() function, possibly in combination with sort() or 
rank()?


Consider:

myNouns <- c("proper", "nouns", "domain", "ontology", "dictionary",
 "dictionary", "corpus", "patent", "files", "proper", "nouns",
 "word", "frequency", "file", "preprocess", "corpus", "proper",
 "nouns", "domain", "ontology", "idea", "nouns", "dictionary",
 "dictionary", "corpus", "attachments", "texts", "corpus",
 "preprocesses", "proper", "nouns")

myNounFrequencies <- table(myNouns)
myNounFrequencies

myNounFrequencies <- sort(myNounFrequencies, decreasing = TRUE)
myNounFrequencies

which(names(myNounFrequencies) == "corpus")





> On May 5, 2017, at 1:58 AM, θ "  wrote:
> 
> θ " 已與您共用 OneDrive 檔案。若要檢視檔案,請按下面的連結。
> 
> 
> 
> [https://r1.res.office365.com/owa/prem/images/dc-png_20.png]
> 
> 2.corpus_patent text.PNG
> 
> 
> [https://r1.res.office365.com/owa/prem/images/dc-png_20.png]
> 
> 3ontology_proper nouns 
> keywords.PNG
> 
> 
> [https://r1.res.office365.com/owa/prem/images/dc-png_20.png]
> 
> 1.patents.PNG
> 
> 
> 
> 
> Hi :
> 
> I want to do patents text mining in R.
> I need to use the proper nouns of domain ontology to build a dictionary.
> Then use the dictionary to analysis my corpus of patent files.
> I want to calculate the proper nouns and get the word frequency that appears 
> in each file.
> 
> Now I have done the preprocess for the corpus and extract the proper nouns 
> from domain ontology.
> But I have no idea how to build a proper nouns dictionary and use the 
> dictionary to analysis my corpus.
> 
> The Attachments are my texts, corpus preprocesses and proper nouns.
> 
> 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.

[R] loading edited functions already in saved workspace automatically

2017-05-05 Thread Ralf Goertz
Hi,

In short: Is it possible to have the previously saved workspace restored
and nevertheless load a function already existing in this workspace via
.Rprofile anyway?

In detail: I use different directories for different projects. In all
those projects I use a function which I therefore try to get into the
session by `myfunc=eval(parse(file=("~/R/myfunc.R")))' in ~/.Rprofile.
Once I leave the session thereby saving the workspace this function gets
saved in ./.RData as well. In a subsequent session in that directory it
gets loaded back. However, in the meantime I might have edited
~/R/myfunc.R. I don't seem to be able to automatically load the new
function into the session. The workspace gets loaded *after* the
execution of ~/.Rprofile. So the new definition of myfunc() gets
overwritten by the old one. I can't use .First() – which is executed
after loading the workspace – because this would load myfunc() into the
environment of .First() instead of the global environment. I could use
.Last() to remove the function before saving the workspace. But then
.Last() gets saved to the workspace which is also not convenient since
when I add another function the same way and edit the definition of
.Last() in ~/.Rprofile to also remove that function this does not work
because I don't get the new .Last() into the session automatically. And
no, removing .Last() from within .Last() doesn't work.

__
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] How do I use R to build a dictionary of proper nouns?

2017-05-05 Thread θ "
�� �� ���c�� OneDrive �n��Ҫ�zҕ�nՈ�B�Y��



[https://r1.res.office365.com/owa/prem/images/dc-png_20.png]

2.corpus_patent text.PNG


[https://r1.res.office365.com/owa/prem/images/dc-png_20.png]

3ontology_proper nouns 
keywords.PNG


[https://r1.res.office365.com/owa/prem/images/dc-png_20.png]

1.patents.PNG




Hi :

I want to do patents text mining in R.
I need to use the proper nouns of domain ontology to build a dictionary.
Then use the dictionary to analysis my corpus of patent files.
I want to calculate the proper nouns and get the word frequency that appears in 
each file.

Now I have done the preprocess for the corpus and extract the proper nouns from 
domain ontology.
But I have no idea how to build a proper nouns dictionary and use the 
dictionary to analysis my corpus.

The Attachments are my texts, corpus preprocesses and proper nouns.

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.