Re: [R] linux, emacs, R on iPhone/iPad

2022-11-21 Thread Erin Hodgess
Hi Dr. H:

I tried this a couple of months ago on my iPad.  Everything would load, but
when I tried to run R, it would never open.  However, my iPad is about 6
years old.  Do you need a particular model for the iPad, please?

Thanks
Erin


On Mon, Nov 21, 2022 at 11:03 AM Richard M. Heiberger 
wrote:

> I discovered that the "iSH shell" is available for the iPhone/iPad from
> the Applications app.
> this is Alpine linux
> Once iSH is loaded from the App store, then open it to a shell and download
>
> apk add emacs
> apk add R
>
> emacs works well for writing files and sending them to a bigger computer
> by airdrop or email etc.
> This is the real Emacs, not the "Not Emacs" app.
> The emacs uses a variant of the iPhone keyboard augmented with tab,
> control, escape, arrows keys
> and allows swiping for typing.
>
> R works sometimes in the linux shell outside emacs, but not yet from the
> emacs *shell*.
> I haven't figures out how to download ESS.
>
> iSH's help page for R
>
> https://github.com/ish-app/ish/wiki/Installing-R-and-any-package-from-the-CRAN
> gives a long docker-related way of getting arbitrary packages to work.
>
> Is there interest in forming R-sig-iOS and CRAN support for an iOS binary
> repository?
>
> Rich
> __
> 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.
>
-- 
Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com

[[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] Plotting a triangular prism

2022-11-11 Thread Erin Hodgess
Great, thank you!

Sincerely,
Erin

On Thu, Nov 10, 2022 at 11:56 PM Jim Lemon  wrote:

> Hi Erin,
> If you want a realistic 3D prism, I would use something like POVRay or
> other rendering software. You have to know your geometry, but you can
> get a very realistic image. I suspect that you want more than just a
> picture of a prism, so you can then generate a PNG image and use it as
> a layer in a composite image in something like the GIMP.
>
> Jim
>
> > > On Nov 10, 2022, at 5:46 PM, Erin Hodgess 
> wrote:
> > >
> > > Hello!
> > >
> > > I’m trying to draw a triangular prism.  I have used rgl, plot3d, and
> it’s
> > > still not working as I would like.
> > >
> > > Has anyone done this, please?
> > >
> > > Thanks for any help.
> > >
> > > Sincerely,
> > > Erin
>
-- 
Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com

[[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] Plotting a triangular prism

2022-11-10 Thread Erin Hodgess
Hello!

I’m trying to draw a triangular prism.  I have used rgl, plot3d, and it’s
still not working as I would like.

Has anyone done this, please?

Thanks for any help.

Sincerely,
Erin
-- 
Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com

[[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] cat in a subroutine

2022-10-13 Thread Erin Hodgess
Steven, would you mind putting that section of code in again, with the cat
statement, please?

I have an idea...
Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com


On Thu, Oct 13, 2022 at 2:13 AM Jim Lemon  wrote:

> Hi Steven,
> I think Erin is right, unless there is a variable named "logistic"
> visible within the function, "cat" will think it is either an argument
> or an R object. If you have the "psych" package loaded, it may see it
> as a closure. There is also a "Logistic" in the stats package, but
> that shouldn't be visible due to the capital L
>
> Jim
>
> On Thu, Oct 13, 2022 at 6:55 PM Steven T. Yen  wrote:
> >
> > Thanks Erin.
> >
> > No. Removing the second line (so that cat simply prints something else),
> >
> > cat("\nMarginal and Discrete Effects of Gen Ordered Logit / Probit
> > Probabilities")
> > #"\n\nlogistic =",logistic)
> >
> > I get yet another nonsense:
> >
> > Error in cat("\nMarginal and Discrete Effects of Gen Ordered Logit /
> > Probit Probabilities") :
> >argument "j" is missing, with no default
> >  >
> >
> > On 10/13/2022 3:37 PM, Erin Hodgess wrote:
> > > Hi Steven:
> > >
> > > Do you have a variable called logistic, please?  I think that might be
> > > the culprit.
> > >
> > > Thanks,
> > > Erin
> > >
> > > On Thu, Oct 13, 2022 at 1:35 AM Steven T. Yen 
> wrote:
> > >
> > > I have had an issue with printing (with cat) in a subroutine for
> > > which I
> > > do not have a applicable example, but I am still hoping to get some
> > > help. In the following, the first block of code works fine.
> > >
> > > ...
> > >
> > > t<-abs(me)/se; p<-2*(1-pt(t,nrow(x)))
> > > sig<-my.sig.levels(p)
> > > out<-data.frame(round(cbind(me,se,t,p),digits));
> out<-cbind(out,sig)
> > > rownames(out)<-names(me)
> > > colnames(out)<-c("est","se","t","p","sig")
> > > j<-grep(".one\\b",rownames(out))
> > > out<-out[-j,]
> > > return(out)
> > > }
> > >
> > > But as soon as I insert lines to print (cat) soething simple, it
> > > spits
> > > out message that appears to be nonsence (unrelated). Any idea.
> Please
> > > help. Thanks.
> > >
> > > t<-abs(me)/se; p<-2*(1-pt(t,nrow(x)))
> > > sig<-my.sig.levels(p)
> > > out<-data.frame(round(cbind(me,se,t,p),digits));
> out<-cbind(out,sig)
> > > rownames(out)<-names(me)
> > > colnames(out)<-c("est","se","t","p","sig")
> > > cat("\nMarginal and Discrete Effects of Gen Ordered Logit / Probit
> > > Probabilities",
> > >  "\n\nlogistic =",logistic)
> > > j<-grep(".one\\b",rownames(out))
> > > out<-out[-j,]
> > > return(out)
> > > }
> > >
> > > In this particular case, the error message was as follows:
> > >
> > > Error in cat("\nMarginal and Discrete Effects of Gen Ordered Logit
> /
> > > Probit Probabilities",  :
> > >unused argument (logistic)
> > >
> > > I have printed this way in numerous routines without problem and
> > > do not
> > > see why this is happending.
> > >
> > > __
> > > 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.
> > >
> > > --
> > > Erin Hodgess, PhD
> > > mailto: erinm.hodg...@gmail.com
> > [[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] cat in a subroutine

2022-10-13 Thread Erin Hodgess
All right.  Are these lines of code part of a larger function, please?  Is
that function possibly calling a loop, please?

Thanks,
Erin

On Thu, Oct 13, 2022 at 1:49 AM Steven T. Yen  wrote:

> Thanks Erin.
>
> No. Removing the second line (so that cat simply prints something else),
>
> cat("\nMarginal and Discrete Effects of Gen Ordered Logit / Probit
> Probabilities")
> #"\n\nlogistic =",logistic)
>
> I get yet another nonsense:
>
> Error in cat("\nMarginal and Discrete Effects of Gen Ordered Logit /
> Probit Probabilities") :
>   argument "j" is missing, with no default
> >
> On 10/13/2022 3:37 PM, Erin Hodgess wrote:
>
> Hi Steven:
>
> Do you have a variable called logistic, please?  I think that might be the
> culprit.
>
> Thanks,
> Erin
>
> On Thu, Oct 13, 2022 at 1:35 AM Steven T. Yen  wrote:
>
>> I have had an issue with printing (with cat) in a subroutine for which I
>> do not have a applicable example, but I am still hoping to get some
>> help. In the following, the first block of code works fine.
>>
>> ...
>>
>> t<-abs(me)/se; p<-2*(1-pt(t,nrow(x)))
>> sig<-my.sig.levels(p)
>> out<-data.frame(round(cbind(me,se,t,p),digits)); out<-cbind(out,sig)
>> rownames(out)<-names(me)
>> colnames(out)<-c("est","se","t","p","sig")
>> j<-grep(".one\\b",rownames(out))
>> out<-out[-j,]
>> return(out)
>> }
>>
>> But as soon as I insert lines to print (cat) soething simple, it spits
>> out message that appears to be nonsence (unrelated). Any idea. Please
>> help. Thanks.
>>
>> t<-abs(me)/se; p<-2*(1-pt(t,nrow(x)))
>> sig<-my.sig.levels(p)
>> out<-data.frame(round(cbind(me,se,t,p),digits)); out<-cbind(out,sig)
>> rownames(out)<-names(me)
>> colnames(out)<-c("est","se","t","p","sig")
>> cat("\nMarginal and Discrete Effects of Gen Ordered Logit / Probit
>> Probabilities",
>>  "\n\nlogistic =",logistic)
>> j<-grep(".one\\b",rownames(out))
>> out<-out[-j,]
>> return(out)
>> }
>>
>> In this particular case, the error message was as follows:
>>
>> Error in cat("\nMarginal and Discrete Effects of Gen Ordered Logit /
>> Probit Probabilities",  :
>>unused argument (logistic)
>>
>> I have printed this way in numerous routines without problem and do not
>> see why this is happending.
>>
>> __
>> 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.
>>
> --
> Erin Hodgess, PhD
> mailto: erinm.hodg...@gmail.com
>
> --
Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com

[[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] cat in a subroutine

2022-10-13 Thread Erin Hodgess
Hi Steven:

Do you have a variable called logistic, please?  I think that might be the
culprit.

Thanks,
Erin

On Thu, Oct 13, 2022 at 1:35 AM Steven T. Yen  wrote:

> I have had an issue with printing (with cat) in a subroutine for which I
> do not have a applicable example, but I am still hoping to get some
> help. In the following, the first block of code works fine.
>
> ...
>
> t<-abs(me)/se; p<-2*(1-pt(t,nrow(x)))
> sig<-my.sig.levels(p)
> out<-data.frame(round(cbind(me,se,t,p),digits)); out<-cbind(out,sig)
> rownames(out)<-names(me)
> colnames(out)<-c("est","se","t","p","sig")
> j<-grep(".one\\b",rownames(out))
> out<-out[-j,]
> return(out)
> }
>
> But as soon as I insert lines to print (cat) soething simple, it spits
> out message that appears to be nonsence (unrelated). Any idea. Please
> help. Thanks.
>
> t<-abs(me)/se; p<-2*(1-pt(t,nrow(x)))
> sig<-my.sig.levels(p)
> out<-data.frame(round(cbind(me,se,t,p),digits)); out<-cbind(out,sig)
> rownames(out)<-names(me)
> colnames(out)<-c("est","se","t","p","sig")
> cat("\nMarginal and Discrete Effects of Gen Ordered Logit / Probit
> Probabilities",
>  "\n\nlogistic =",logistic)
> j<-grep(".one\\b",rownames(out))
> out<-out[-j,]
> return(out)
> }
>
> In this particular case, the error message was as follows:
>
> Error in cat("\nMarginal and Discrete Effects of Gen Ordered Logit /
> Probit Probabilities",  :
>unused argument (logistic)
>
> I have printed this way in numerous routines without problem and do not
> see why this is happending.
>
> __
> 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.
>
-- 
Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com

[[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] Odd behavior of a function within apply

2022-08-09 Thread Erin Hodgess
My “count1a” function was only looking for types of integers and
characters.  There were a few logical types, which were the source of the
error.

Thanks,
Erin

On Tue, Aug 9, 2022 at 11:33 AM David Carlson  wrote:

> Could you have columns that are not character or integer so that y is
> never defined in the function?
>
> count1a(1:5/3)
> Error in count1a(1:5/3) : object 'y' not found
>
> David Carlson
>
>
> On Mon, Aug 8, 2022 at 1:35 PM Erin Hodgess 
> wrote:
>
>> OK.⁠​ I'm back again.⁠​ So my test1.⁠​df is 236x390 If I put in the
>> following:⁠​ lapply(test1.⁠​df,count1a) Error in FUN(X[[i]], .⁠​.⁠​.⁠​) :⁠​
>> object 'y' not found > lapply(test1.⁠​df,count1a) Error in FUN(X[[i]],
>> .⁠​.⁠​.⁠​) :⁠​ object 'y' not found > sapply(test1.⁠​df,count1a)
>> ZjQcmQRYFpfptBannerStart
>> This Message Is From an External Sender
>> This message came from outside your organization.
>>
>> ZjQcmQRYFpfptBannerEnd
>>
>> OK.  I'm back again.
>>
>> So my test1.df is 236x390
>>
>> If I put in the following:
>>  lapply(test1.df,count1a)
>> Error in FUN(X[[i]], ...) : object 'y' not found
>> > lapply(test1.df,count1a)
>> Error in FUN(X[[i]], ...) : object 'y' not found
>> > sapply(test1.df,count1a)
>> Error in FUN(X[[i]], ...) : object 'y' not found
>> >
>> What am I doing wrong, please?
>> Thanks,
>> Erin
>>
>>
>> Erin Hodgess, PhD
>> mailto: erinm.hodg...@gmail.com
>>
>>
>> On Mon, Aug 8, 2022 at 1:41 PM Erin Hodgess  wrote:
>>
>> > Awesome, thanks so much!!
>> >
>> > Erin Hodgess, PhD
>> > mailto: erinm.hodg...@gmail.com
>> >
>> >
>> > On Mon, Aug 8, 2022 at 1:38 PM John Fox  wrote:
>> >
>> >> Dear Erin,
>> >>
>> >> The problem is that the data frame gets coerced to a character matrix,
>> >> and the only column with "" entries is the 9th (the second one you
>> >> supplied):
>> >>
>> >> as.matrix(test1.df)
>> >> X1_1_HZP1 X1_1_HBM1_mon X1_1_HBM1_yr
>> >> 1  "48160"   "December""2014"
>> >> 2  "48198"   "June""2018"
>> >> 3  "80027"   "August"  "2016"
>> >> 4  "48161"   ""    NA
>> >> 5  NA""NA
>> >> 6  "48911"   "August"  "1985"
>> >> 7  NA"April"   "2019"
>> >> 8  "48197"   "February""1993"
>> >> 9  "48021"   ""NA
>> >> 10 "11355"   "December""1990"
>> >>
>> >> (Here, test1.df only contains the three columns you provided.)
>> >>
>> >> A solution is to use sapply:
>> >>
>> >>  > sapply(test1.df, count1a)
>> >>  X1_1_HZP1 X1_1_HBM1_mon  X1_1_HBM1_yr
>> >>  2 3 3
>> >>
>> >>
>> >> I hope this helps,
>> >>   John
>> >>
>> >>
>> >> On 2022-08-08 1:22 p.m., Erin Hodgess wrote:
>> >> > Hello!
>> >> >
>> >> > I have the following data.frame
>> >> >   dput(test1.df[1:10,8:10])
>> >> > structure(list(X1_1_HZP1 = c(48160L, 48198L, 80027L, 48161L,
>> >> > NA, 48911L, NA, 48197L, 48021L, 11355L), X1_1_HBM1_mon = c("December",
>> >> > "June", "August", "", "", "August", "April", "February", "",
>> >> > "December"), X1_1_HBM1_yr = c(2014L, 2018L, 2016L, NA, NA, 1985L,
>> >> > 2019L, 1993L, NA, 1990L)), row.names = c(NA, 10L), class = "data.frame")
>> >> >
>> >> > And the following function:
>> >> >> dput(count1a)
>> >> > function (x)
>> >> > {
>> >> >  if (typeof(x) == "integer")
>> >> >  y <- sum(is.na(x))
>> >> >  if (typeof(x) == "character")
>> >> >  y <- sum(x == "")
>> >> >  return(y)
>> >> > }
>> >> > When I use the apply function with count1a, I get the following:
>> >> >   apply(test1.df[1:10,8:10],2,count1a)

[R] Odd behavior of a function within apply

2022-08-08 Thread Erin Hodgess
Hello!

I have the following data.frame
 dput(test1.df[1:10,8:10])
structure(list(X1_1_HZP1 = c(48160L, 48198L, 80027L, 48161L,
NA, 48911L, NA, 48197L, 48021L, 11355L), X1_1_HBM1_mon = c("December",
"June", "August", "", "", "August", "April", "February", "",
"December"), X1_1_HBM1_yr = c(2014L, 2018L, 2016L, NA, NA, 1985L,
2019L, 1993L, NA, 1990L)), row.names = c(NA, 10L), class = "data.frame")

And the following function:
> dput(count1a)
function (x)
{
if (typeof(x) == "integer")
y <- sum(is.na(x))
if (typeof(x) == "character")
y <- sum(x == "")
return(y)
}
When I use the apply function with count1a, I get the following:
 apply(test1.df[1:10,8:10],2,count1a)
X1_1_HZP1 X1_1_HBM1_mon  X1_1_HBM1_yr
   NA 3NA
However, when I do use columns 8 and 10, I get the correct response:
 apply(test1.df[1:10,c(8,10)],2,count1a)
   X1_1_HZP1 X1_1_HBM1_yr
   2    3
>
I am really baffled.  If I use count1a on a single column, it works fine.

Any suggestions much appreciated.
Thanks,
Sincerely,
Erin


Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com

[[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] Reading a CSV file

2022-08-06 Thread Erin Hodgess
Hello!

Is there a way to read the first line of a CSV file, then skip 4 lines,
then continue reading, please?

I know you can skip from the top, but I don't know if you can read and then
skip.

Thanks,
Erin


Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com

[[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] Mixing plotting symbols with text

2022-06-07 Thread Erin Hodgess
Hello!

Hope you’re having a great day!

I would like to combine plotting symbols with text.

I have tried
xp2a <- expression(paste(pch =3, “my stuff”))
But when I use that as a plot title, it just shows as “3 my stuff”.

I have a feeling that it’s going to be something very straightforward that
I am missing.

Thanks for your help,
Sincerely,
Erin
-- 
Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com

[[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] matching type question, please

2021-12-16 Thread Erin Hodgess
Wow!  These are awesome!  Thanks so much for the special cases!

Erin

On Thu, Dec 16, 2021 at 3:52 PM Rui Barradas  wrote:

> Hello,
>
> And here is another solution, addressing the problem raised by Bert and
> avoiding unique.
>
>
> xr1 <- 8:0
> xr2 <- 0:8
> xs1 <- 9:3
> xs2 <- 4
> cbind(xr1, xr2)[(xr1 %in% xs1) & (xr2 %in% xs2),]
> #xr1 xr2
> #  4   4
>
>
> xr1 <- c(1,2,1)
> xr2 <- c(4,5,4)
> xs1 <- c(6,6)
> xs2 <- c(7,7)
> cbind(xr1, xr2)[(xr1 %in% xs1) & (xr2 %in% xs2),]
> #   xr1 xr2
> (only column names are output)
>
>
> But this only works if the vectors xr* are longer than xs*. Try swapping
> the test values (both sets, Erin's original and Bert's) and see.
>
> So here is a function that checks lengths first, then takes the right
> branch.
>
>
> dupSpecial <- function(x1, x2, y1, y2){
>if(length(x1) > length(y1)){
>  cbind(x1, x2)[(x1 %in% y1) & (x2 %in% y2),]
>} else {
>  cbind(y1, y2)[(y1 %in% x1) & (y2 %in% x2),]
>}
> }
> dupSpecial(xr1, xr2, xs1, xs2)
>
>
> Hope this helps,
>
> Rui Barradas
>
>
> Às 22:01 de 16/12/21, Bert Gunter escreveu:
> > I am not sure Eric's solution is what is wanted:
> >
> > Consider:
> > xr1 <- c(1,2,1)
> > xr2 <- c(4,5,4)
> > xs1 <- c(6,6)
> > xs2 <- c(7,7)
> >
> >> z1 <- cbind(xr1, xr2)
> >> z2 <- cbind(xs1,xs2)
> >> z1
> >   xr1 xr2
> > [1,]   1   4
> > [2,]   2   5
> > [3,]   1   4
> >> z2
> >   xs1 xs2
> > [1,]   6   7
> > [2,]   6   7
> >
> > If what is wanted is to find rows of z2 that match those in z1, Eric's
> > proposal gives (note the added comma to give a logical indexing
> > vector):
> >
> >> a <- cbind(c(xr1,xs1),c(xr2,xs2))
> >> a[duplicated(a),]
> >   [,1] [,2]
> > [1,]14
> > [2,]67
> >
> > This is obviously wrong, as it gives duplicates *within* z1 and z2,
> > not between them. To get rows of z2 that appear as duplicates of rows
> > of z1, then something like the following should do:
> >
> >> a <- rbind(unique(z1),unique(z2))
> >> a
> >   xr1 xr2
> > [1,]   1   4
> > [2,]   2   5
> > [3,]   6   7
> >> a[duplicated(a),]
> >   xr1 xr2
> > ## nothing
> >
> > I leave it to Erin to determine whether this is relevant to her
> > problem and, if so, how to fix up my suggestion appropriately.
> >
> > Cheers,
> > Bert Gunter
> >
> > "The trouble with having an open mind is that people keep coming along
> > and sticking things into it."
> > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
> >
> > On Thu, Dec 16, 2021 at 12:39 PM Eric Berger 
> wrote:
> >>
> >>> a <- cbind(c(xr1,xs1),c(xr2,xs2))
> >>> a[duplicated(a)]
> >> [1] 4 4
> >>
> >>
> >> On Thu, Dec 16, 2021 at 10:18 PM Erin Hodgess 
> wrote:
> >>>
> >>> Hello!
> >>>
> >>> I have the following:
> >>>
> >>>   cbind(xr1,xr2)
> >>>
> >>>xr1 xr2
> >>>
> >>>   [1,]   8   0
> >>>
> >>>   [2,]   7   1
> >>>
> >>>   [3,]   6   2
> >>>
> >>>   [4,]   5   3
> >>>
> >>>   [5,]   4   4
> >>>
> >>>   [6,]   3   5
> >>>
> >>>   [7,]   2   6
> >>>
> >>>   [8,]   1   7
> >>>
> >>>   [9,]   0   8
> >>>
> >>>> cbind(xs1,xs2)
> >>>
> >>>   xs1 xs2
> >>>
> >>> [1,]   9   4
> >>>
> >>> [2,]   8   4
> >>>
> >>> [3,]   7   4
> >>>
> >>> [4,]   6   4
> >>>
> >>> [5,]   5   4
> >>>
> >>> [6,]   4   4
> >>>
> >>> [7,]   3   4
> >>>
> >>>>
> >>>
> >>> These are ordered pairs.  I would like to get something that shows
> that the
> >>> pair (4,4) appears in both.  I have tried cbind with match and %in% and
> >>> intersect, but not getting the exact results.
> >>>
> >>> Any suggestions would be appreciated.  I have a feeling that it's
> something
> >>> really easy that I'm just not seeing.
> >>>
> >>> Thanks,
> >>> Erin
>

[R] matching type question, please

2021-12-16 Thread Erin Hodgess
Hello!

I have the following:

 cbind(xr1,xr2)

  xr1 xr2

 [1,]   8   0

 [2,]   7   1

 [3,]   6   2

 [4,]   5   3

 [5,]   4   4

 [6,]   3   5

 [7,]   2   6

 [8,]   1   7

 [9,]   0   8

> cbind(xs1,xs2)

 xs1 xs2

[1,]   9   4

[2,]   8   4

[3,]   7   4

[4,]   6   4

[5,]   5   4

[6,]   4   4

[7,]   3   4

>

These are ordered pairs.  I would like to get something that shows that the
pair (4,4) appears in both.  I have tried cbind with match and %in% and
intersect, but not getting the exact results.

Any suggestions would be appreciated.  I have a feeling that it's something
really easy that I'm just not seeing.

Thanks,
Erin


Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com

[[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] Format utils::bibentry with a 'corporate name'

2021-10-29 Thread Erin Hodgess
Maybe use \{ for the second one?

On Fri, Oct 29, 2021 at 11:22 AM Sam Albers 
wrote:

> Hi all,
>
> Does anyone know of a way to force utils::bibentry to mimic the BibTex
> behaviour of using double { to force a "corporate name" in the author
> field to print correctly? For example take this bibentry:
>
> entry <- utils::bibentry(
>   bibtype = "Manual",
>   title = "The Thing",
>   author = "The Data People",
>   organization = "The Data Org",
>   year = format(Sys.Date(), "%Y")
> )
>
> entry
> #> People TD (2021). _The Thing_. The Data Org.
> print(entry, style = "citation")
> #>
> #> People TD (2021). _The Thing_. The Data Org.
> #>
> #> A BibTeX entry for LaTeX users is
> #>
> #>   @Manual{,
> #> title = {The Thing},
> #> author = {The Data People},
> #> organization = {The Data Org},
> #> year = {2021},
> #>   }
>
> I can simply add "{" right in the author string which then passes that
> to the Bibtex entry but the author field is still thinking it is a
> person with a name and I also get some warnings:
>
> entry <- utils::bibentry(
>   bibtype = "Manual",
>   title = "The Thing",
>   author = "{The Data People}",
>   organization = "The Data Org",
>   year = format(Sys.Date(), "%Y")
> )
>
>
> print(entry, style = "citation")
> #> Warning in parseLatex(x): x:1: unexpected '}'
> #> Warning in parseLatex(x): x:1: unexpected END_OF_INPUT 'The'
> #> Warning in parseLatex(x): x:1: unexpected '}'
> #> Warning in parseLatex(x): x:1: unexpected END_OF_INPUT 'The'
> #> Warning in withCallingHandlers(.External2(C_parseRd, tcon, srcfile,
> "UTF-8", :
> #> :1: unexpected '}'
> #> Warning in withCallingHandlers(.External2(C_parseRd, tcon, srcfile,
> "UTF-8", : :4: unexpected END_OF_INPUT 'The Data Org.
> #> '
> #>
> #> People D (2021). _The Thing_. The Data Org.
> #>
> #> A BibTeX entry for LaTeX users is
> #>
> #>   @Manual{,
> #> title = {The Thing},
> #> author = {{The Data People}},
> #> organization = {The Data Org},
> #> year = {2021},
> #>   }
>
> Any thoughts?
>
> Thanks in advance,
>
> Sam
>
> __
> 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.
>
-- 
Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com

[[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] A holiday related question

2020-12-11 Thread Erin Hodgess
Hello everyone!

Hope you are all doing well and enjoying whatever December holiday you
celebrate.

Here is my question, please.  Has anyone put together R with a Raspberry Pi
or an Arduino to run music and Christmas lights, please?  I have seen a
little bit about using R with Raspberry Pi, but really nothing in this
vein.

In the past, I have used R with an Ubuntu laptop to run a temperature
sensor, which is a start.

Thanks for any suggestions.  Take care.

Sincerely,
Erin

-- 
Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com

[[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] [External] Re: Package recommendations for outputting table with cell formatting

2020-10-23 Thread Erin Hodgess
That latex() function is the best thing since sliced bread, Coca Cola, etc.!

Thanks


On Fri, Oct 23, 2020 at 9:24 PM Richard M. Heiberger  wrote:

> To John and everyone else,
>
> Please add Hmisc::latex to your  how-to-make-beautiful-tables-in-r
> document.
> We first included latex() in S in 1995, and it is still actively
> maintained and improved.
>
> Rich
>
> Here are the first few lines of ?latex
>
> Convert an S object to LaTeX, and Related Utilities
>
> Description:
>
>  ‘latex’ converts its argument to a ‘.tex’ file appropriate for
>  inclusion in a LaTeX2e document.  ‘latex’ is a generic function
>  that calls one of ‘latex.default’, ‘latex.function’, ‘latex.list’.
>
>  ‘latex.default’ does appropriate rounding and decimal alignment
>  and produces a file containing a LaTeX tabular environment to
>  print the matrix or data.frame ‘x’ as a table.
>
>  ‘latex.function’ prepares an S function for printing by issuing
>  ‘sed’ commands that are similar to those in the ‘S.to.latex’
>  procedure in the ‘s.to.latex’ package (Chambers and Hastie, 1993).
>  ‘latex.function’ can also produce ‘verbatim’ output or output that
>  works with the ‘Sweavel’ LaTeX style at   http://biostat.mc.vanderbilt.edu/SweaveTemplate>.
>
>
> On Fri, Oct 23, 2020 at 11:11 PM John Kane  wrote:
> >
> > This comes with no guarantee since i have only tried one or two packages
> > mentioned but have a look at https://rfortherestofus.com/2019/11/how-to-make-beautiful-tables-in-r/;>
> R
> > Tables.
> >
> >
> > On Fri, 23 Oct 2020 at 20:28, Dennis Fisher 
> wrote:
> >
> > > R 4.0.2
> > > OS X
> > >
> > > Colleagues
> > >
> > > I have the unfortunate need to create a large number of tables
> (destined
> > > for a Word document).  I need to color cells depending on the contents,
> > > e.g., blue if the value is < 0.5, red if the value is > 1.5.
> > > If the output went initially to Excel, that would work; outputting
> > > directly to Word would be even better.
> > > I expect that several packages can accomplish this.  I am looking for
> > > recommendations as to which package (or combination) of packages is
> best to
> > > accomplish this.
> > >
> > > Dennis
> > >
> > > Dennis Fisher MD
> > > P < (The "P Less Than" Company)
> > > Phone / Fax: 1-866-PLessThan (1-866-753-7784)
> > > www.PLessThan.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.
> > >
> >
> >
> > --
> > John Kane
> > Kingston ON Canada
> >
> > [[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.
>
-- 
Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com

[[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] A WSL question with allocation

2020-07-21 Thread Erin Hodgess
Hello!

Hope everyone is staying well.

I’m not sure if this is the right list for this question, but here goes.

I am using the new experimental WSL on my Windows laptop.  It was going
well until yesterday.   I’m using Ubuntu 20.04.  I am starting to get “
error: cannot allocate vector of size 1.3 gb”.  I have 32 gb of RAM.  I
tried using “unlimit -v 16”, not working.

Has anyone else had trouble with this, please? I’m thinking that it might
be because of the newness of the WSL platform.

Thanks,
Erin

-- 
Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com

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

2020-07-15 Thread Erin Hodgess
Hi Andy:

I just checked in "options", and the following appears:


$stringsAsFactors

[1] FALSE


I think this might be it.


You may want to look at options() in R-3.6.1.


Thanks,

Erin


Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com


On Wed, Jul 15, 2020 at 9:45 AM andy elprama  wrote:

> Dear R-users,
>
> Something strange happened within the command "levels"
>
> R version 3.6.1
> name <- c("a","b","c")
> values <- c(1,2,3)
> data <- data.frame(name,values)
> levels(data$name)
> [1] "a" "b" "c"
>
> R version 4.0
> name <- c("a","b","c")
> values <- c(1,2,3)
> data <- data.frame(name,values)
> levels(data$name)
> [1] NULL
>
> What is happening here?
>
> [[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] Issues whenWorking with Daily Time Series and Generating Forecasts

2020-07-13 Thread Erin Hodgess
Just figured out the label format!

Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com


On Mon, Jul 13, 2020 at 6:58 PM Paul Bernal  wrote:

> Dear friend, yes,
>
> When I generate the forecasts i want the output to include the original
> series, the fitted vaules and the forecast and I want the x-axis to show
> all dates (both the dates of the historical series plus the future dares in
> -mm-dd format).
>
> Thank you so much for your kind and valuable help.
>
> Cheers,
>
> Paul
>
>
> El lun., 13 de julio de 2020 7:10 p. m., Erin Hodgess <
> erinm.hodg...@gmail.com> escribió:
>
>> Hi again, Paul!
>>
>> When you are plotting the final product, do you want both the original
>> series, the fitted values, and the forecast, please?
>>
>> I am messing around with your data.
>>
>> Thanks,
>> Erin
>>
>> Erin Hodgess, PhD
>> mailto: erinm.hodg...@gmail.com
>>
>>
>> On Mon, Jul 13, 2020 at 12:41 PM Paul Bernal 
>> wrote:
>>
>>> Dear friends, hope you are doing great,
>>>
>>> I am working with a daily time series, the series starts on march,10,
>>> 2020
>>> until july 9th, 2020.
>>>
>>> I would like to know if there is a way to make it a ts object, specifying
>>> the year, month and day with the ts function.
>>>
>>> First, I tried setting the ts object as follows:
>>>
>>> trainingts <- ts(Dataset2$PANCASES, frequency=7)
>>>
>>> but when I plot trainingts, the x-axis (time axis) shows values like 5,
>>> 10,
>>> 15 and not the dates.
>>>
>>> Secondly, I tried doing the following
>>>
>>> trainingts2 <- ts(Dataset2$PANCASES, start=c(2020,3,10), end=c(2020,7,9),
>>> frequency=365.25)
>>>
>>> but with this setup, now the x-axis has extrange values like 2020.006,
>>> 2020.008, etc.
>>>
>>> Now, when generating forecasts with auto.arima function I get extremely
>>> large values for the y-axis, which makes the forecasts look like a flat
>>> line:
>>>
>>> trainingts <- ts(Dataset2$PANCASES, frequency=7)
>>>
>>> ModelArima2 <- auto.arima(trainingts, lambda=0)
>>> ModelArima2For <- forecast(ModelArima2, h=30)
>>> plot(ModelArima2For)
>>>
>>> I am providing the dput() for my dataset below.
>>>
>>> Any help and/or guidance will be greatly appreciated,
>>>
>>> Best regards,
>>>
>>> Paul
>>>
>>>  > dput(Dataset2)
>>> structure(list(DATE = structure(c(18331, 18332, 18333, 18334,
>>> 18335, 18336, 18337, 18338, 18339, 18340, 18341, 18342, 18343,
>>> 18344, 18345, 18346, 18347, 18348, 18349, 18350, 18351, 18352,
>>> 18353, 18354, 18355, 18356, 18357, 18358, 18359, 18360, 18361,
>>> 18362, 18363, 18364, 18365, 18366, 18367, 18368, 18369, 18370,
>>> 18371, 18372, 18373, 18374, 18375, 18376, 18377, 18378, 18379,
>>> 18380, 18381, 18382, 18383, 18384, 18385, 18386, 18387, 18388,
>>> 18389, 18390, 18391, 18392, 18393, 18394, 18395, 18396, 18397,
>>> 18398, 18399, 18400, 18401, 18402, 18403, 18404, 18405, 18406,
>>> 18407, 18408, 18409, 18410, 18411, 18412, 18413, 18414, 18415,
>>> 18416, 18417, 18418, 18419, 18420, 18421, 18422, 18423, 18424,
>>> 18425, 18426, 18427, 18428, 18429, 18430, 18431, 18432, 18433,
>>> 18434, 18435, 18436, 18437, 18438, 18439, 18440, 18441, 18442,
>>> 18443, 18444, 18445, 18446, 18447, 18448, 18449, 18450, 18451,
>>> 18452), class = "Date"), PANCASES = c(1, 8, 11, 27, 36, 43, 55,
>>> 69, 86, 109, 137, 200, 313, 345, 345, 443, 558, 674, 786, 901,
>>> 989, 1181, 1181, 1317, 1475, 1673, 1801, 1988, 2100, 2249, 2528,
>>> 2752, 2974, 3234, 3400, 3472, 3574, 3751, 4016, 4210, 4273, 4467,
>>> 4658, 4821, 5166, 5338, 5538, 5779, 6021, 6021, 6378, 6532, 6720,
>>> 7090, 7090, 7197, 7523, 7731, 7868, 8070, 8282, 8448, 8616, 8783,
>>> 8944, 9118, 9268, 9449, 9606, 9726, 9867, 9977, 10116, 10267,
>>> 10577, 10926, 11183, 11447, 11728, 12131, 12531, 13018, 13463,
>>> 13837, 14095, 14609, 15044, 15463, 16004, 16425, 16854, 17233,
>>> 17889, 18586, 19211, 20059, 21418, 21422, 21962, 22597, 23351,
>>> 24274, 25222, 26030, 26752, 27314, 28030, 29037, 29905, 30658,
>>> 31686, 32785, 33550, 34463, 35237, 35995, 36983, 38149, 39334,
>>> 40291, 41251, 42216)), row.names = c(NA, -122L), class = "data.frame")
>>>
>>> [[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] Issues whenWorking with Daily Time Series and Generating Forecasts

2020-07-13 Thread Erin Hodgess
I’m not entirely sure if we can do the Y-m-d format, but I will give it a
try!

Thanks

On Mon, Jul 13, 2020 at 6:58 PM Paul Bernal  wrote:

> Dear friend, yes,
>
> When I generate the forecasts i want the output to include the original
> series, the fitted vaules and the forecast and I want the x-axis to show
> all dates (both the dates of the historical series plus the future dares in
> -mm-dd format).
>
> Thank you so much for your kind and valuable help.
>
> Cheers,
>
> Paul
>
>
> El lun., 13 de julio de 2020 7:10 p. m., Erin Hodgess <
> erinm.hodg...@gmail.com> escribió:
>
>> Hi again, Paul!
>>
>> When you are plotting the final product, do you want both the original
>> series, the fitted values, and the forecast, please?
>>
>> I am messing around with your data.
>>
>> Thanks,
>> Erin
>>
>> Erin Hodgess, PhD
>> mailto: erinm.hodg...@gmail.com
>>
>>
>> On Mon, Jul 13, 2020 at 12:41 PM Paul Bernal 
>> wrote:
>>
>>> Dear friends, hope you are doing great,
>>>
>>> I am working with a daily time series, the series starts on march,10,
>>> 2020
>>> until july 9th, 2020.
>>>
>>> I would like to know if there is a way to make it a ts object, specifying
>>> the year, month and day with the ts function.
>>>
>>> First, I tried setting the ts object as follows:
>>>
>>> trainingts <- ts(Dataset2$PANCASES, frequency=7)
>>>
>>> but when I plot trainingts, the x-axis (time axis) shows values like 5,
>>> 10,
>>> 15 and not the dates.
>>>
>>> Secondly, I tried doing the following
>>>
>>> trainingts2 <- ts(Dataset2$PANCASES, start=c(2020,3,10), end=c(2020,7,9),
>>> frequency=365.25)
>>>
>>> but with this setup, now the x-axis has extrange values like 2020.006,
>>> 2020.008, etc.
>>>
>>> Now, when generating forecasts with auto.arima function I get extremely
>>> large values for the y-axis, which makes the forecasts look like a flat
>>> line:
>>>
>>> trainingts <- ts(Dataset2$PANCASES, frequency=7)
>>>
>>> ModelArima2 <- auto.arima(trainingts, lambda=0)
>>> ModelArima2For <- forecast(ModelArima2, h=30)
>>> plot(ModelArima2For)
>>>
>>> I am providing the dput() for my dataset below.
>>>
>>> Any help and/or guidance will be greatly appreciated,
>>>
>>> Best regards,
>>>
>>> Paul
>>>
>>>  > dput(Dataset2)
>>> structure(list(DATE = structure(c(18331, 18332, 18333, 18334,
>>> 18335, 18336, 18337, 18338, 18339, 18340, 18341, 18342, 18343,
>>> 18344, 18345, 18346, 18347, 18348, 18349, 18350, 18351, 18352,
>>> 18353, 18354, 18355, 18356, 18357, 18358, 18359, 18360, 18361,
>>> 18362, 18363, 18364, 18365, 18366, 18367, 18368, 18369, 18370,
>>> 18371, 18372, 18373, 18374, 18375, 18376, 18377, 18378, 18379,
>>> 18380, 18381, 18382, 18383, 18384, 18385, 18386, 18387, 18388,
>>> 18389, 18390, 18391, 18392, 18393, 18394, 18395, 18396, 18397,
>>> 18398, 18399, 18400, 18401, 18402, 18403, 18404, 18405, 18406,
>>> 18407, 18408, 18409, 18410, 18411, 18412, 18413, 18414, 18415,
>>> 18416, 18417, 18418, 18419, 18420, 18421, 18422, 18423, 18424,
>>> 18425, 18426, 18427, 18428, 18429, 18430, 18431, 18432, 18433,
>>> 18434, 18435, 18436, 18437, 18438, 18439, 18440, 18441, 18442,
>>> 18443, 18444, 18445, 18446, 18447, 18448, 18449, 18450, 18451,
>>> 18452), class = "Date"), PANCASES = c(1, 8, 11, 27, 36, 43, 55,
>>> 69, 86, 109, 137, 200, 313, 345, 345, 443, 558, 674, 786, 901,
>>> 989, 1181, 1181, 1317, 1475, 1673, 1801, 1988, 2100, 2249, 2528,
>>> 2752, 2974, 3234, 3400, 3472, 3574, 3751, 4016, 4210, 4273, 4467,
>>> 4658, 4821, 5166, 5338, 5538, 5779, 6021, 6021, 6378, 6532, 6720,
>>> 7090, 7090, 7197, 7523, 7731, 7868, 8070, 8282, 8448, 8616, 8783,
>>> 8944, 9118, 9268, 9449, 9606, 9726, 9867, 9977, 10116, 10267,
>>> 10577, 10926, 11183, 11447, 11728, 12131, 12531, 13018, 13463,
>>> 13837, 14095, 14609, 15044, 15463, 16004, 16425, 16854, 17233,
>>> 17889, 18586, 19211, 20059, 21418, 21422, 21962, 22597, 23351,
>>> 24274, 25222, 26030, 26752, 27314, 28030, 29037, 29905, 30658,
>>> 31686, 32785, 33550, 34463, 35237, 35995, 36983, 38149, 39334,
>>> 40291, 41251, 42216)), row.names = c(NA, -122L), class = "data.frame")
>>>
>>> [[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.
>>>
>> --
Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com

[[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] Issues whenWorking with Daily Time Series and Generating Forecasts

2020-07-13 Thread Erin Hodgess
Hi again, Paul!

When you are plotting the final product, do you want both the original
series, the fitted values, and the forecast, please?

I am messing around with your data.

Thanks,
Erin

Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com


On Mon, Jul 13, 2020 at 12:41 PM Paul Bernal  wrote:

> Dear friends, hope you are doing great,
>
> I am working with a daily time series, the series starts on march,10, 2020
> until july 9th, 2020.
>
> I would like to know if there is a way to make it a ts object, specifying
> the year, month and day with the ts function.
>
> First, I tried setting the ts object as follows:
>
> trainingts <- ts(Dataset2$PANCASES, frequency=7)
>
> but when I plot trainingts, the x-axis (time axis) shows values like 5, 10,
> 15 and not the dates.
>
> Secondly, I tried doing the following
>
> trainingts2 <- ts(Dataset2$PANCASES, start=c(2020,3,10), end=c(2020,7,9),
> frequency=365.25)
>
> but with this setup, now the x-axis has extrange values like 2020.006,
> 2020.008, etc.
>
> Now, when generating forecasts with auto.arima function I get extremely
> large values for the y-axis, which makes the forecasts look like a flat
> line:
>
> trainingts <- ts(Dataset2$PANCASES, frequency=7)
>
> ModelArima2 <- auto.arima(trainingts, lambda=0)
> ModelArima2For <- forecast(ModelArima2, h=30)
> plot(ModelArima2For)
>
> I am providing the dput() for my dataset below.
>
> Any help and/or guidance will be greatly appreciated,
>
> Best regards,
>
> Paul
>
>  > dput(Dataset2)
> structure(list(DATE = structure(c(18331, 18332, 18333, 18334,
> 18335, 18336, 18337, 18338, 18339, 18340, 18341, 18342, 18343,
> 18344, 18345, 18346, 18347, 18348, 18349, 18350, 18351, 18352,
> 18353, 18354, 18355, 18356, 18357, 18358, 18359, 18360, 18361,
> 18362, 18363, 18364, 18365, 18366, 18367, 18368, 18369, 18370,
> 18371, 18372, 18373, 18374, 18375, 18376, 18377, 18378, 18379,
> 18380, 18381, 18382, 18383, 18384, 18385, 18386, 18387, 18388,
> 18389, 18390, 18391, 18392, 18393, 18394, 18395, 18396, 18397,
> 18398, 18399, 18400, 18401, 18402, 18403, 18404, 18405, 18406,
> 18407, 18408, 18409, 18410, 18411, 18412, 18413, 18414, 18415,
> 18416, 18417, 18418, 18419, 18420, 18421, 18422, 18423, 18424,
> 18425, 18426, 18427, 18428, 18429, 18430, 18431, 18432, 18433,
> 18434, 18435, 18436, 18437, 18438, 18439, 18440, 18441, 18442,
> 18443, 18444, 18445, 18446, 18447, 18448, 18449, 18450, 18451,
> 18452), class = "Date"), PANCASES = c(1, 8, 11, 27, 36, 43, 55,
> 69, 86, 109, 137, 200, 313, 345, 345, 443, 558, 674, 786, 901,
> 989, 1181, 1181, 1317, 1475, 1673, 1801, 1988, 2100, 2249, 2528,
> 2752, 2974, 3234, 3400, 3472, 3574, 3751, 4016, 4210, 4273, 4467,
> 4658, 4821, 5166, 5338, 5538, 5779, 6021, 6021, 6378, 6532, 6720,
> 7090, 7090, 7197, 7523, 7731, 7868, 8070, 8282, 8448, 8616, 8783,
> 8944, 9118, 9268, 9449, 9606, 9726, 9867, 9977, 10116, 10267,
> 10577, 10926, 11183, 11447, 11728, 12131, 12531, 13018, 13463,
> 13837, 14095, 14609, 15044, 15463, 16004, 16425, 16854, 17233,
> 17889, 18586, 19211, 20059, 21418, 21422, 21962, 22597, 23351,
> 24274, 25222, 26030, 26752, 27314, 28030, 29037, 29905, 30658,
> 31686, 32785, 33550, 34463, 35237, 35995, 36983, 38149, 39334,
> 40291, 41251, 42216)), row.names = c(NA, -122L), class = "data.frame")
>
> [[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] Issues whenWorking with Daily Time Series and Generating Forecasts

2020-07-13 Thread Erin Hodgess
Hi Paul

Have you looked at the xts or zoo packages, please?

They work very well on daily series.

Thanks,
Erin

On Mon, Jul 13, 2020 at 12:41 PM Paul Bernal  wrote:

> Dear friends, hope you are doing great,
>
> I am working with a daily time series, the series starts on march,10, 2020
> until july 9th, 2020.
>
> I would like to know if there is a way to make it a ts object, specifying
> the year, month and day with the ts function.
>
> First, I tried setting the ts object as follows:
>
> trainingts <- ts(Dataset2$PANCASES, frequency=7)
>
> but when I plot trainingts, the x-axis (time axis) shows values like 5, 10,
> 15 and not the dates.
>
> Secondly, I tried doing the following
>
> trainingts2 <- ts(Dataset2$PANCASES, start=c(2020,3,10), end=c(2020,7,9),
> frequency=365.25)
>
> but with this setup, now the x-axis has extrange values like 2020.006,
> 2020.008, etc.
>
> Now, when generating forecasts with auto.arima function I get extremely
> large values for the y-axis, which makes the forecasts look like a flat
> line:
>
> trainingts <- ts(Dataset2$PANCASES, frequency=7)
>
> ModelArima2 <- auto.arima(trainingts, lambda=0)
> ModelArima2For <- forecast(ModelArima2, h=30)
> plot(ModelArima2For)
>
> I am providing the dput() for my dataset below.
>
> Any help and/or guidance will be greatly appreciated,
>
> Best regards,
>
> Paul
>
>  > dput(Dataset2)
> structure(list(DATE = structure(c(18331, 18332, 18333, 18334,
> 18335, 18336, 18337, 18338, 18339, 18340, 18341, 18342, 18343,
> 18344, 18345, 18346, 18347, 18348, 18349, 18350, 18351, 18352,
> 18353, 18354, 18355, 18356, 18357, 18358, 18359, 18360, 18361,
> 18362, 18363, 18364, 18365, 18366, 18367, 18368, 18369, 18370,
> 18371, 18372, 18373, 18374, 18375, 18376, 18377, 18378, 18379,
> 18380, 18381, 18382, 18383, 18384, 18385, 18386, 18387, 18388,
> 18389, 18390, 18391, 18392, 18393, 18394, 18395, 18396, 18397,
> 18398, 18399, 18400, 18401, 18402, 18403, 18404, 18405, 18406,
> 18407, 18408, 18409, 18410, 18411, 18412, 18413, 18414, 18415,
> 18416, 18417, 18418, 18419, 18420, 18421, 18422, 18423, 18424,
> 18425, 18426, 18427, 18428, 18429, 18430, 18431, 18432, 18433,
> 18434, 18435, 18436, 18437, 18438, 18439, 18440, 18441, 18442,
> 18443, 18444, 18445, 18446, 18447, 18448, 18449, 18450, 18451,
> 18452), class = "Date"), PANCASES = c(1, 8, 11, 27, 36, 43, 55,
> 69, 86, 109, 137, 200, 313, 345, 345, 443, 558, 674, 786, 901,
> 989, 1181, 1181, 1317, 1475, 1673, 1801, 1988, 2100, 2249, 2528,
> 2752, 2974, 3234, 3400, 3472, 3574, 3751, 4016, 4210, 4273, 4467,
> 4658, 4821, 5166, 5338, 5538, 5779, 6021, 6021, 6378, 6532, 6720,
> 7090, 7090, 7197, 7523, 7731, 7868, 8070, 8282, 8448, 8616, 8783,
> 8944, 9118, 9268, 9449, 9606, 9726, 9867, 9977, 10116, 10267,
> 10577, 10926, 11183, 11447, 11728, 12131, 12531, 13018, 13463,
> 13837, 14095, 14609, 15044, 15463, 16004, 16425, 16854, 17233,
> 17889, 18586, 19211, 20059, 21418, 21422, 21962, 22597, 23351,
> 24274, 25222, 26030, 26752, 27314, 28030, 29037, 29905, 30658,
> 31686, 32785, 33550, 34463, 35237, 35995, 36983, 38149, 39334,
> 40291, 41251, 42216)), row.names = c(NA, -122L), class = "data.frame")
>
> [[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.
>
-- 
Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com

[[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] Using OpenBLAS on Ubuntu

2020-06-28 Thread Erin Hodgess
Thanks

On Sun, Jun 28, 2020 at 10:27 PM Michael Hannon 
wrote:

> Or maybe R-devel.
>
> On Sun, Jun 28, 2020 at 8:51 PM Jeff Newmiller 
> wrote:
> >
> > Wouldn't this question make more sense in r-sig-debian?
> >
> > On June 28, 2020 7:54:49 PM PDT, Erin Hodgess 
> wrote:
> > >Hello!
> > >
> > >Hope everyone is doing well.
> > >
> > >I'm not sure if this is the correct place to post, but I thought I
> > >would
> > >start here.
> > >
> > >I have R 4.0.2 on Ubuntu 20.04.  I would like to use OpenBLAS with it,
> > >but
> > >I'm not sure if I can because I did not compile from source.  Is that
> > >possible, please?
> > >
> > >Thanks for any help!
> > >
> > >Sincerely,
> > >Erin
> > >
> > >Erin Hodgess, PhD
> > >mailto: erinm.hodg...@gmail.com
> > >
> > >   [[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.
> >
> > --
> > Sent from my phone. Please excuse my brevity.
> >
> > ______
> > 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.
>
-- 
Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com

[[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] Using OpenBLAS on Ubuntu

2020-06-28 Thread Erin Hodgess
That’s why I thought to check here first.

Thanks!

On Sun, Jun 28, 2020 at 9:51 PM Jeff Newmiller 
wrote:

> Wouldn't this question make more sense in r-sig-debian?
>
> On June 28, 2020 7:54:49 PM PDT, Erin Hodgess 
> wrote:
> >Hello!
> >
> >Hope everyone is doing well.
> >
> >I'm not sure if this is the correct place to post, but I thought I
> >would
> >start here.
> >
> >I have R 4.0.2 on Ubuntu 20.04.  I would like to use OpenBLAS with it,
> >but
> >I'm not sure if I can because I did not compile from source.  Is that
> >possible, please?
> >
> >Thanks for any help!
> >
> >Sincerely,
> >Erin
> >
> >Erin Hodgess, PhD
> >mailto: erinm.hodg...@gmail.com
> >
> >   [[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.
>
> --
> Sent from my phone. Please excuse my brevity.
>
-- 
Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com

[[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] Using OpenBLAS on Ubuntu

2020-06-28 Thread Erin Hodgess
Hello!

Hope everyone is doing well.

I'm not sure if this is the correct place to post, but I thought I would
start here.

I have R 4.0.2 on Ubuntu 20.04.  I would like to use OpenBLAS with it, but
I'm not sure if I can because I did not compile from source.  Is that
possible, please?

Thanks for any help!

Sincerely,
Erin

Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com

[[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] confusion about write.csv

2020-06-04 Thread Erin Hodgess
Thanks to all for the help.

I found that write.table works nicely, with col.names = FALSE with append =
TRUE.

Sincerely,
Erin

Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com


On Thu, Jun 4, 2020 at 7:56 PM Jeff Newmiller 
wrote:

> Use write.table.
>
> Write.csv follows a very specific definition for csv... one element of
> which is that it is not allowed to have a second header line after data
> lines. The only way for write.csv to enforce this is to disallow appending.
>
> On June 4, 2020 6:34:14 PM PDT, Erin Hodgess 
> wrote:
> > Hello!
> >
> >Hope everyone is doing as well as possible.
> >
> >I have a question about write.csv.  I thought that the append argument
> >would permit adding another data frame with the same column names.
> >
> >Here is my example:
> >
> > date1 <- as.Date("2020-03-09")
> > wday <- weekdays(date1)
> > x1 <- data.frame(date=date1,day=wday,lev=1:5,y=rnorm(5))
> > x1
> >dateday lev   y
> >1 2020-03-09 Monday   1 -0.09543049
> >2 2020-03-09 Monday   2  0.53943428
> >3 2020-03-09 Monday   3 -0.79224851
> >4 2020-03-09 Monday   4  0.68168147
> >5 2020-03-09 Monday   5 -1.02902897
> > write.csv(file="test1.csv",x1,row.names=FALSE)
> > date1 <- date1 + 1
> > wday <- weekdays(date1)
> > x2 <- data.frame(date=date1,day=wday,lev=1:5,y=rnorm(5))
> > x2
> >date day lev  y
> >1 2020-03-10 Tuesday   1 -0.6648301
> >2 2020-03-10 Tuesday   2 -0.1137580
> >3 2020-03-10 Tuesday   3  1.6532675
> >4 2020-03-10 Tuesday   4 -0.5845293
> >5 2020-03-10 Tuesday   5  0.2849392
> > write.csv(file="test1.csv",x2,row.names=FALSE,append=TRUE)
> >Warning message:
> >In write.csv(file = "test1.csv", x2, row.names = FALSE, append = TRUE)
> >:
> >  attempt to set 'append' ignored
> >
> >The values from x2 appear in the test1.csv file.
> >
> >What am I missing, please?
> >
> >Thanks,
> >Erin
> >
> >
> >Erin Hodgess, PhD
> >mailto: erinm.hodg...@gmail.com
> >
> >   [[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.
>
> --
> Sent from my phone. Please excuse my brevity.
>

[[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] Solved: confusion with write.csv

2020-06-04 Thread Erin Hodgess
Change over to write.table.

Sorry for the wasted bandwidth.

Thanks,
Erin

Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com

[[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] confusion about write.csv

2020-06-04 Thread Erin Hodgess
 Hello!

Hope everyone is doing as well as possible.

I have a question about write.csv.  I thought that the append argument
would permit adding another data frame with the same column names.

Here is my example:

 date1 <- as.Date("2020-03-09")
 wday <- weekdays(date1)
 x1 <- data.frame(date=date1,day=wday,lev=1:5,y=rnorm(5))
 x1
dateday lev   y
1 2020-03-09 Monday   1 -0.09543049
2 2020-03-09 Monday   2  0.53943428
3 2020-03-09 Monday   3 -0.79224851
4 2020-03-09 Monday   4  0.68168147
5 2020-03-09 Monday   5 -1.02902897
 write.csv(file="test1.csv",x1,row.names=FALSE)
 date1 <- date1 + 1
 wday <- weekdays(date1)
 x2 <- data.frame(date=date1,day=wday,lev=1:5,y=rnorm(5))
 x2
date day lev  y
1 2020-03-10 Tuesday   1 -0.6648301
2 2020-03-10 Tuesday   2 -0.1137580
3 2020-03-10 Tuesday   3  1.6532675
4 2020-03-10 Tuesday   4 -0.5845293
5 2020-03-10 Tuesday   5  0.2849392
 write.csv(file="test1.csv",x2,row.names=FALSE,append=TRUE)
Warning message:
In write.csv(file = "test1.csv", x2, row.names = FALSE, append = TRUE) :
  attempt to set 'append' ignored

The values from x2 appear in the test1.csv file.

What am I missing, please?

Thanks,
Erin


Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com

[[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] read_excel() ignore case of worksheet name?

2020-05-26 Thread Erin Hodgess
Nice!

On Tue, May 26, 2020 at 9:37 PM Ista Zahn  wrote:

> How about
>
> read_excel_table <- function(x) {
>   readxl::read_excel(
> x,
> sheet=grep("tables",
>excel_sheets(x),
>ignore.case = TRUE,
>value = TRUE),
> .name_repair = fixColNames
>   )
> }
>
> lapply(SIS$FULL_FILEPATH, read_excel_table)
>
>
> --Ista
>
> On Tue, May 26, 2020 at 11:05 PM Ravi Jeyaraman  wrote:
> >
> > I’ve already tried that and doesn’t work
> >
> >
> >
> > From: Erin Hodgess [mailto:erinm.hodg...@gmail.com]
> > Sent: Tuesday, May 26, 2020 10:55 PM
> > To: Ravi Jeyaraman 
> > Cc: r-help@r-project.org
> > Subject: Re: [R] read_excel() ignore case of worksheet name?
> >
> >
> >
> > Here’s a thought, please.  Could you use the tolower function and make
> them all lower case?
> >
> >
> >
> > Thanks,
> >
> > Erin
> >
> >
> >
> > On Tue, May 26, 2020 at 8:21 PM Ravi Jeyaraman  <mailto:rav...@gmail.com> > wrote:
> >
> > Hello All, Is there any parameter to make read_excel() ignore the
> case-sensitiveness of the worksheet?   I'm using the below to ready in
> multiple spreadsheets and it works perfectly fine if the worksheet is named
> 'Tables', but fails when it's named ' TABLES'.  Any thoughts?
> >
> > lapply(1:nrow(SIS), function(x) readxl::read_excel(SIS$FULL_FILEPATH[x],
> sheet='Tables', .name_repair = fixColNames))
> >
> > Thanks in advance for your response.
> >
> > Cheers
> > Ravi
> >
> >
> >
> > --
> > This email has been checked for viruses by AVG.
> > https://www.avg.com
> >
> > ______
> > R-help@r-project.org <mailto: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.
> >
> > --
> >
> > Erin Hodgess, PhD
> >
> > mailto: erinm.hodg...@gmail.com <mailto:erinm.hodg...@gmail.com>
> >
> >
> > [[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.
>
-- 
Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com

[[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] read_excel() ignore case of worksheet name?

2020-05-26 Thread Erin Hodgess
What about getSheets, please?

That will get the sheet names.

On Tue, May 26, 2020 at 8:59 PM Ravi Jeyaraman  wrote:

> I’ve already tried that and doesn’t work
>
>
>
> *From:* Erin Hodgess [mailto:erinm.hodg...@gmail.com]
> *Sent:* Tuesday, May 26, 2020 10:55 PM
> *To:* Ravi Jeyaraman 
> *Cc:* r-help@r-project.org
> *Subject:* Re: [R] read_excel() ignore case of worksheet name?
>
>
>
> Here’s a thought, please.  Could you use the tolower function and make
> them all lower case?
>
>
>
> Thanks,
>
> Erin
>
>
>
> On Tue, May 26, 2020 at 8:21 PM Ravi Jeyaraman  wrote:
>
> Hello All, Is there any parameter to make read_excel() ignore the
> case-sensitiveness of the worksheet?   I'm using the below to ready in
> multiple spreadsheets and it works perfectly fine if the worksheet is named
> 'Tables', but fails when it's named ' TABLES'.  Any thoughts?
>
> lapply(1:nrow(SIS), function(x) readxl::read_excel(SIS$FULL_FILEPATH[x],
> sheet='Tables', .name_repair = fixColNames))
>
> Thanks in advance for your response.
>
> Cheers
> Ravi
>
>
>
> --
> This email has been checked for viruses by AVG.
> https://www.avg.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.
>
> --
>
> Erin Hodgess, PhD
>
> mailto: erinm.hodg...@gmail.com
>
>
> <http://www.avg.com/email-signature?utm_medium=email_source=link_campaign=sig-email_content=emailclient>
>  Virus-free.
> www.avg.com
> <http://www.avg.com/email-signature?utm_medium=email_source=link_campaign=sig-email_content=emailclient>
> <#m_-1767373775547039939_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
-- 
Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com

[[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] read_excel() ignore case of worksheet name?

2020-05-26 Thread Erin Hodgess
Here’s a thought, please.  Could you use the tolower function and make them
all lower case?

Thanks,
Erin

On Tue, May 26, 2020 at 8:21 PM Ravi Jeyaraman  wrote:

> Hello All, Is there any parameter to make read_excel() ignore the
> case-sensitiveness of the worksheet?   I'm using the below to ready in
> multiple spreadsheets and it works perfectly fine if the worksheet is named
> 'Tables', but fails when it's named ' TABLES'.  Any thoughts?
>
> lapply(1:nrow(SIS), function(x) readxl::read_excel(SIS$FULL_FILEPATH[x],
> sheet='Tables', .name_repair = fixColNames))
>
> Thanks in advance for your response.
>
> Cheers
> Ravi
>
>
>
> --
> This email has been checked for viruses by AVG.
> https://www.avg.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.
>
-- 
Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com

[[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] MAP HELP

2020-04-04 Thread Erin Hodgess
Hi!

What kind of a map are you looking for?  Google Earth, Open Street map or
something else, please?

Is your data in a data frame?

Thanks,
Erin


On Sat, Apr 4, 2020 at 2:10 PM anjaly menon  wrote:

> Hello,
>
> I have a dataset with latitude, longitude, station serial numbers of my
> fish samples collected from the Barents Sea. I need to plot out from where
> the samples are coming from using the latitude and longitude and the range
> of body sizes (length of fishes) using R.
> I installed packages like sp, maptools, mapdata, rgdal,shape, maps. Is
> there any code to do this task? Please let me know.
>
> Cheers
>
> --
> *Anjaly Govindankutty Menon*
> Erasmus Mundus Scholar
> Universite de Bordeaux, France
>
> [[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.
>
-- 
Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com

[[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] Mapping of countries

2020-03-31 Thread Erin Hodgess
That would have been my code too!


On Tue, Mar 31, 2020 at 2:10 AM Jim Lemon  wrote:

> Hi George,
> Try this:
>
> library(maps)
> map("world",xlim=c(34.353,60.369),ylim=c(16.7,32.193),
>  regions="Saudi Arabia",col="yellow",fill=TRUE)
> map("world",regions="Bahrain",col="yellow",fill=TRUE,add=TRUE)
> map("world",regions="Kuwait",col="lightblue",fill=TRUE,add=TRUE)
> map("world",regions="Qatar",col="yellow",fill=TRUE,add=TRUE)
> map("world",regions="United Arab
> Emirates",col="lightblue",fill=TRUE,add=TRUE)
> map("world",regions="Oman",col="lightgreen",fill=TRUE,add=TRUE)
>
> Jim
>
> On Tue, Mar 31, 2020 at 12:39 PM george brida 
> wrote:
> >
> > Dear R users,
> >
> > i would like to plot the maps of the Gulf Cooperation Council (GCC)
> > countries (KSA, Qatar, Bahrain, Kuwait, UAE and Oman) with these
> > constraints: i/ KSA , Qatar and Bahrain have the same face color , ii/
> > Kuweit and UAE with the same face color and iii/Oman  with another face
> > color. Is there any code in R doing this task.
> >
> > Many 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.
>
-- 
Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com

[[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] Mapping of countries

2020-03-30 Thread Erin Hodgess
Hello George!

Do you mean to have a map of the world with these countries filled in, or
to have just those countries on the map, please?

Thanks,
Erin

Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com


On Mon, Mar 30, 2020 at 7:38 PM george brida  wrote:

> Dear R users,
>
> i would like to plot the maps of the Gulf Cooperation Council (GCC)
> countries (KSA, Qatar, Bahrain, Kuwait, UAE and Oman) with these
> constraints: i/ KSA , Qatar and Bahrain have the same face color , ii/
> Kuweit and UAE with the same face color and iii/Oman  with another face
> color. Is there any code in R doing this task.
>
> Many 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] About the multiprecision computing package in R

2020-03-14 Thread Erin Hodgess
Got it!  Thanks!



On Sat, Mar 14, 2020 at 2:24 PM J C Nash  wrote:

> As I understand things, OpenBLAS will improve the performance of
> computations on regular IEEE 754 formats.
>
> I use Rmpfr for much longer numbers, e.g., 50 decimal digits, which --
> depending on scale of numbers in a
> vector -- can mean one needs approximately 100 decimals to accumulate the
> dot product. As I indicated, I
> have not been able to verify the internals. Probably I'll have to dig.
> However, for the moment I'm using
> David Smith's FM-Fortran, which offers a dot product function which does
> appear to do this.
>
> JN
>
> On 2020-03-14 4:17 p.m., Erin Hodgess wrote:
> > Are you using a PC, please?  You may want to consider installing
> OpenBLAS.  It’s a bit tricky but worth the time/effort.
> >
> > Thanks,
> > Erin
> >
> >
> > On Sat, Mar 14, 2020 at 2:10 PM J C Nash  profjcn...@gmail.com>> wrote:
> >
> > Rmpfr does "support" matrix algebra, but I have been trying for some
> > time to determine if it computes "double" precision (i.e., double the
> > set level of precision) inner products. I suspect that it does NOT,
> > which is unfortunate. However, I would be happy to be wrong about
> > this.
> >
> > JN
> >
> > On 2020-03-14 3:41 p.m., Bert Gunter wrote:
> > > Read its documentation yourself and unless you have good reason
> not to,
> > > always cc the list (which I have done here).
> > >
> > >
> > > Bert Gunter
> > >
> > > "The trouble with having an open mind is that people keep coming
> along and
> > > sticking things into it."
> > > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
> > >
> > >
> > > On Sat, Mar 14, 2020 at 12:28 PM 林伟璐 <13917987...@163.com  13917987...@163.com>> wrote:
> > >
> > >> Thanks. Does it support matrix algebra?
> > >>
> > >>
> > >>
> > >> 林伟璐
> > >> 邮箱:13917987...@163.com <mailto:13917987...@163.com>
> > >>
> > >>
> > <
> https://maas.mail.163.com/dashi-web-extend/html/proSignature.html?iconUrl=http%3A%2F%2Fmail-online.nosdn.127.net%2F17c23bc1722125aa6261c33736f525c5.jpg=%E6%9E%97%E4%BC%9F%E7%92%90=13917987541%40163.com=1=%5B%22%E9%82%AE%E7%AE%B1%EF%BC%9A13917987541%40163.com%22%5D
> >
> > >>
> > >> 签名由 网易邮箱大师 <https://mail.163.com/dashi/dlpro.html?from=mail88> 定制
> > >>
> > >> On 03/15/2020 03:18, Bert Gunter  bgunter.4...@gmail.com>> wrote:
> > >> Use google instead, as I recommended. If that's impossible in
> China, you
> > >> should state that and what you tried (Baidu) in your query.
> > >>
> > >> You'll get the Rmpfr package.
> > >>
> > >> Bert Gunter
> > >>
> > >> "The trouble with having an open mind is that people keep coming
> along and
> > >> sticking things into it."
> > >> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
> > >>
> > >>
> > >> On Sat, Mar 14, 2020 at 11:48 AM 林伟璐 <13917987...@163.com
> <mailto:13917987...@163.com>> wrote:
> > >>
> > >>> Thanks, I tried Baidu but get nothing
> > >>>
> > >>>
> > >>>
> > >>> 林伟璐
> > >>> 邮箱:13917987...@163.com <mailto:13917987...@163.com>
> > >>>
> > >>>
> > <
> https://maas.mail.163.com/dashi-web-extend/html/proSignature.html?iconUrl=http%3A%2F%2Fmail-online.nosdn.127.net%2F17c23bc1722125aa6261c33736f525c5.jpg=%E6%9E%97%E4%BC%9F%E7%92%90=13917987541%40163.com=1=%5B%22%E9%82%AE%E7%AE%B1%EF%BC%9A13917987541%40163.com%22%5D
> >
> > >>>
> > >>> 签名由 网易邮箱大师 <https://mail.163.com/dashi/dlpro.html?from=mail88>
> 定制
> > >>>
> > >>> On 03/15/2020 02:44, Bert Gunter  <mailto:bgunter.4...@gmail.com>> wrote:
> > >>> Here's a novel idea:
> > >>> Do a google search on "multiprecision computing package R" for
> an answer.
> > >>>
> > >>> Bert Gunter
> > >>>
> > >>> "The trouble with having an open mind is that people 

Re: [R] About the multiprecision computing package in R

2020-03-14 Thread Erin Hodgess
Are you using a PC, please?  You may want to consider installing OpenBLAS.
It’s a bit tricky but worth the time/effort.

Thanks,
Erin


On Sat, Mar 14, 2020 at 2:10 PM J C Nash  wrote:

> Rmpfr does "support" matrix algebra, but I have been trying for some
> time to determine if it computes "double" precision (i.e., double the
> set level of precision) inner products. I suspect that it does NOT,
> which is unfortunate. However, I would be happy to be wrong about
> this.
>
> JN
>
> On 2020-03-14 3:41 p.m., Bert Gunter wrote:
> > Read its documentation yourself and unless you have good reason not to,
> > always cc the list (which I have done here).
> >
> >
> > Bert Gunter
> >
> > "The trouble with having an open mind is that people keep coming along
> and
> > sticking things into it."
> > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
> >
> >
> > On Sat, Mar 14, 2020 at 12:28 PM 林伟璐 <13917987...@163.com> wrote:
> >
> >> Thanks. Does it support matrix algebra?
> >>
> >>
> >>
> >> 林伟璐
> >> 邮箱:13917987...@163.com
> >>
> >> <
> https://maas.mail.163.com/dashi-web-extend/html/proSignature.html?iconUrl=http%3A%2F%2Fmail-online.nosdn.127.net%2F17c23bc1722125aa6261c33736f525c5.jpg=%E6%9E%97%E4%BC%9F%E7%92%90=13917987541%40163.com=1=%5B%22%E9%82%AE%E7%AE%B1%EF%BC%9A13917987541%40163.com%22%5D
> >
> >>
> >> 签名由 网易邮箱大师 <https://mail.163.com/dashi/dlpro.html?from=mail88> 定制
> >>
> >> On 03/15/2020 03:18, Bert Gunter  wrote:
> >> Use google instead, as I recommended. If that's impossible in China, you
> >> should state that and what you tried (Baidu) in your query.
> >>
> >> You'll get the Rmpfr package.
> >>
> >> Bert Gunter
> >>
> >> "The trouble with having an open mind is that people keep coming along
> and
> >> sticking things into it."
> >> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
> >>
> >>
> >> On Sat, Mar 14, 2020 at 11:48 AM 林伟璐 <13917987...@163.com> wrote:
> >>
> >>> Thanks, I tried Baidu but get nothing
> >>>
> >>>
> >>>
> >>> 林伟璐
> >>> 邮箱:13917987...@163.com
> >>>
> >>> <
> https://maas.mail.163.com/dashi-web-extend/html/proSignature.html?iconUrl=http%3A%2F%2Fmail-online.nosdn.127.net%2F17c23bc1722125aa6261c33736f525c5.jpg=%E6%9E%97%E4%BC%9F%E7%92%90=13917987541%40163.com=1=%5B%22%E9%82%AE%E7%AE%B1%EF%BC%9A13917987541%40163.com%22%5D
> >
> >>>
> >>> 签名由 网易邮箱大师 <https://mail.163.com/dashi/dlpro.html?from=mail88> 定制
> >>>
> >>> On 03/15/2020 02:44, Bert Gunter  wrote:
> >>> Here's a novel idea:
> >>> Do a google search on "multiprecision computing package R" for an
> answer.
> >>>
> >>> Bert Gunter
> >>>
> >>> "The trouble with having an open mind is that people keep coming along
> >>> and sticking things into it."
> >>> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
> >>>
> >>>
> >>> On Sat, Mar 14, 2020 at 10:36 AM 林伟璐 <13917987...@163.com> wrote:
> >>>
> >>>> Dear all
> >>>>
> >>>>
> >>>> I need a multiprecision computing package in R, if anyone in the list
> >>>> knows, please let me known...
> >>>>
> >>>>
> >>>> Many thanks
> >>>>
> >>>>
> >>>> Weilu Lin
> >>>> [[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-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.
>
-- 
Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com

[[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 Dplyr hands on project

2020-01-25 Thread Erin Hodgess
Hello!

“R for Data Science” is an excellent reference.

Thanks,
Erin


On Sat, Jan 25, 2020 at 11:00 PM SAS_learner  wrote:

> Hello All ,
>
> I am trying to learn R and started with R Dplyr for data management
> .Can anyone point out  to a  book or place or GitHub location which
> has a project that I can use to replicate , to improve my skills would
> be of great help.
>
> thanks
> Kumar
>
> __
> 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.
>
-- 
Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com

[[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 CMD Batch on Windows and use of the ampersand

2019-12-25 Thread Erin Hodgess
Nice!
Thanks so much!

Take care,
Erin


On Wed, Dec 25, 2019 at 1:49 PM Richard M. Heiberger  wrote:

> Hi Erin.
>
> I think the easiest way is to use sh, which is included as part of Rtools.
>
> From the CMD command line, enter
> c:/Rtools/bin/sh -i
>
> You are now running a Unix shell, and all the behaviors you expect are
> there, including ";" and "&"
>
> Rich
>
> On Wed, Dec 25, 2019 at 12:16 PM Erin Hodgess 
> wrote:
> >
> > Hello!  Merry Christmas to those of you celebrating it, and happy
> > holidays to those celebrating other holidays.
> >
> > Here is a question about R CMD BATCH on Windows.  We know that
> >
> > R CMD BATCH infile outfile &
> >
> > On Linux or Mac will let you continue interactively from the command
> line.
> > However, it does not work with the interactive component from Windows.
> Is
> > there a workaround for this, please?
> > Thanks,
> > Sincerely,
> > Erin
> > Erin Hodgess, PhD
> > mailto: erinm.hodg...@gmail.com
> >
> > [[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.
>
-- 
Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com

[[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 CMD Batch on Windows and use of the ampersand

2019-12-25 Thread Erin Hodgess
This is great information!  Thank you so much!

Sincerely,
Erin

Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com


On Wed, Dec 25, 2019 at 10:44 AM Ivan Krylov  wrote:

> On Wed, 25 Dec 2019 09:13:28 -0800
> Erin Hodgess  wrote:
>
> > We know that
> >
> > R CMD BATCH infile outfile &
> >
> > On Linux or Mac will let you continue interactively from the command
> > line.
>
> This is a property of the command line shell being used, not of R CMD
> BATCH itself. One way to do the same on Windows would be to use the
> start command [*]:
>
> start "" R CMD BATCH infile outfile
>
> If a new window being created is a problem for you, try start "" /MIN
> or start "" /B, but I am not sure it would help.
>
> --
> Best regards,
> Ivan
>
> [*] https://ss64.com/nt/start.html
>

[[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 CMD Batch on Windows and use of the ampersand

2019-12-25 Thread Erin Hodgess
Hello!  Merry Christmas to those of you celebrating it, and happy
holidays to those celebrating other holidays.

Here is a question about R CMD BATCH on Windows.  We know that

R CMD BATCH infile outfile &

On Linux or Mac will let you continue interactively from the command line.
However, it does not work with the interactive component from Windows.  Is
there a workaround for this, please?
Thanks,
Sincerely,
Erin
Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com

[[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] shinyWidgets::sliderTextInput

2019-08-07 Thread Erin Hodgess
Hi Sigbert


Here is something that has both the sliderTextInput and Radio Buttons,
which may be helpful:

library("shiny")

library("shinyWidgets")


ui <- fluidPage(

  br(),

  sliderTextInput(

inputId = "mySliderText",

label = "My House",

choices = list("choice 1" = "choice 1","choice 2" ="choice 2",

"choice 3" ="choice 3"),

selected = "choice 1"

  ),


  radioButtons(inputId="slope", label="Radio Buttons",

   choices=list("Choice 1" = "Choice 1","Choice 2" = "Choice 2",

 "Choice 3" = "Choice 3")),



  verbatimTextOutput(outputId = "result")

)


server <- function(input, output, session) {

  output$result <- renderPrint({

  str(input$mySliderText)

  str(input$slope)

}

)


}


shinyApp(ui = ui, server = server)



Hope this helps!


Sincerely,

Erin



Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com


On Wed, Aug 7, 2019 at 6:31 AM Sigbert Klinke 
wrote:

> Hi,
>
> > Is there a label argument, please? I think that might be it.
>
> In my example I had a label, but this not the problem since
>
>  > choices=list("choice1"=1, "choice2"=2,"choice3"=3)
>  > as.character(choices)
> [1] "1" "2" "3"
>
> delivers the result as it is used in sliderTextInput. I was hoping there
> was a way to bypass that behaviour without changing the sliderTextInput
> function ;)
> The default action of selectInput using a list for choices is to show in
> the UI element the list names, but to deliver to the shiny app the
> number if one is selected.
>
> Thanks Sigbert
>
> --
> https://hu.berlin/sk
> https://hu.berlin/mmstat3
>

[[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] shinyWidgets::sliderTextInput

2019-08-06 Thread Erin Hodgess
Hi Sigbert:

Is there a label argument, please? I think that might be it.

Thanks,
Erin

On Tue, Aug 6, 2019 at 1:52 AM Sigbert Klinke 
wrote:

> Hi,
>
> I'am using
>
> sliderTextInput('myinput', choices=list("choice1"=1, "choice2"=2,
> "choice3"=3))
>
> But in the shiny app the UI element shows '1', '2', instead of
> 'choice1', 'choice2' etc.
>
> I think the reason is that in shinyTextInput is done
>
>  if (!is.character(choices)) {
>  choices <- as.character(choices)
>  }
>
> Any idea if I could achieve my wished behaviour?
>
> Best Sigbert
>
> --
> https://hu.berlin/sk
> https://hu.berlin/mmstat3
>
> __
> 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.
>
-- 
Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com

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

2019-05-17 Thread Erin Hodgess
Hi!

If you have a Spatial Points Data Frame, you can use the following function
to create a grid:

create1 <- function(obj) {

# Function that creates a new_data object if one is missing

convex_hull = chull(coordinates(obj)[,1],coordinates(obj)[,2])

convex_hull = c(convex_hull, convex_hull[1]) # Close the polygon

d = Polygon(coordinates(obj)[convex_hull, ])

new_data = spsample(d, 20, type = "regular")

gridded(new_data) = TRUE

return(new_data)

}



Hope this helps!


Sincerely,

Erin




Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com


On Fri, May 17, 2019 at 8:01 AM DINESHKUMAR 
wrote:

> how to create prediction grid like meuse grid
> *Thanks & Regards*
>
> *C Dineshkumar*
> *Bsc Agriculture*
> *M.Tech Remote Sensing and GIS*
>
> [[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] character comp

2019-02-09 Thread Erin Hodgess
Nice, Rui!  Thanks

On Sat, Feb 9, 2019 at 11:55 AM Rui Barradas  wrote:

> Hello,
>
> The following will do it.
>
> mydataframe$dvar <- c(sapply(mydataframe[-1], nchar) %*% c(1, -1))
>
>
> Hope this helps,
>
> Rui Barradas
>
> Às 18:05 de 09/02/2019, Val escreveu:
> > Hi  All,
> > In a given data frame I  want to compare character values of two columns.
> > My sample data looks like as follow,
> >
> > mydataframe <- read.table( text='ID  var1 var2
> >R1   AA  AAA
> >R2   AAA AAA
> >R3A  
> >R4   AA   A
> >R5   A  AAA', header = TRUE, as.is = TRUE )
> >
> > For each ID, I want  create the third column "dvar" as  difference
> > between var1 and var2
> >   Row1( R1)   the "dvar" value will be -1 and the complete  desired out
> > put looks like as follow.
> >
> >   IDvar1 var2   dvar
> >   R1   AAAAA-1
> >   R2  AAA  AAA  0
> >   R3A-3
> >   R4   AA   A1
> >   R5A AAA  -2
> >
> > How do i do this? Any help please?
> > Thank you
> >
> > __
> > 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.
>
-- 
Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com

[[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] character comp

2019-02-09 Thread Erin Hodgess
Ok.  Try something like
nchar(mydataframe[,1])-nchar(mydataframe[,2])


On Sat, Feb 9, 2019 at 11:21 AM Erin Hodgess 
wrote:

> Will it always be A’s or will there be a mix please?
>
> On Sat, Feb 9, 2019 at 11:06 AM Val  wrote:
>
>> Hi  All,
>> In a given data frame I  want to compare character values of two columns.
>> My sample data looks like as follow,
>>
>> mydataframe <- read.table( text='ID  var1 var2
>>   R1   AA  AAA
>>   R2   AAA AAA
>>   R3A  
>>   R4   AA   A
>>   R5   A  AAA', header = TRUE, as.is = TRUE )
>>
>> For each ID, I want  create the third column "dvar" as  difference
>> between var1 and var2
>>  Row1( R1)   the "dvar" value will be -1 and the complete  desired out
>> put looks like as follow.
>>
>>  IDvar1 var2   dvar
>>  R1   AAAAA-1
>>  R2  AAA  AAA  0
>>  R3A-3
>>  R4   AA   A1
>>  R5A AAA  -2
>>
>> How do i do this? Any help please?
>> Thank you
>>
>> __
>> 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.
>>
> --
> Erin Hodgess, PhD
> mailto: erinm.hodg...@gmail.com
>
-- 
Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com

[[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] character comp

2019-02-09 Thread Erin Hodgess
Will it always be A’s or will there be a mix please?

On Sat, Feb 9, 2019 at 11:06 AM Val  wrote:

> Hi  All,
> In a given data frame I  want to compare character values of two columns.
> My sample data looks like as follow,
>
> mydataframe <- read.table( text='ID  var1 var2
>   R1   AA  AAA
>   R2   AAA AAA
>   R3A  
>   R4   AA   A
>   R5   A  AAA', header = TRUE, as.is = TRUE )
>
> For each ID, I want  create the third column "dvar" as  difference
> between var1 and var2
>  Row1( R1)   the "dvar" value will be -1 and the complete  desired out
> put looks like as follow.
>
>  IDvar1 var2   dvar
>  R1   AAAAA-1
>  R2  AAA  AAA  0
>  R3A-3
>  R4   AA   A1
>  R5A AAA  -2
>
> How do i do this? Any help please?
> Thank you
>
> __
> 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.
>
-- 
Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com

[[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] tibble question with a mean

2018-09-21 Thread Erin Hodgess
Nice!

I didn’t realize you could do all that!

Thanks!


On Fri, Sep 21, 2018 at 10:32 AM William Dunlap  wrote:

> Since you are using tibbles you may want to go whole-hog and use the dplyr
> package as well.
>
> > xt <-
> tibble(x=LETTERS[1:4],y=1:4,z=log2(1:4),a=c("dog","cat","tree","ferret"))
> > xt %>% summarize(yMean=mean(y), zMean=mean(z), aLast=last(a))
> # A tibble: 1 x 3
>   yMean zMean aLast
> 
> 1   2.5  1.15 ferret
>
>
> Bill Dunlap
> TIBCO Software
> wdunlap tibco.com
>
> On Thu, Sep 20, 2018 at 5:50 PM, Erin Hodgess 
> wrote:
>
>> Hello!
>>
>> Here is a toy tibble problem:
>>
>> xt <-
>> tibble(x=LETTERS[1:4],y=1:4,z=rnorm(4),a=c("dog","cat","tree","ferret"))
>> str(xt)
>> Classes ‘tbl_df’, ‘tbl’ and 'data.frame': 4 obs. of  4 variables:
>>  $ x: chr  "A" "B" "C" "D"
>>  $ y: int  1 2 3 4
>>  $ z: num  0.3246 0.0504 0.339 0.4872
>>  $ a: chr  "dog" "cat" "tree" "ferret"
>> #No surprise
>>  xt %>% mean
>> [1] NA
>> Warning message:
>> In mean.default(.) : argument is not numeric or logical: returning NA
>> #surprised!
>> mean(xt[2:3])
>> [1] NA
>> Warning message:
>> In mean.default(xt[2:3]) : argument is not numeric or logical: returning
>> NA
>>  xt[, 2:3] %>% mean
>> [1] NA
>> Warning message:
>> In mean.default(.) : argument is not numeric or logical: returning NA
>>
>> I have a feeling that I'm doing something silly wrong.  Has anyone run
>> into
>> this, please?  I saw something like this on this list, but didn't see a
>> solution.
>>
>> Thanks,
>> Erin
>>
>>
>> Erin Hodgess, PhD
>> mailto: erinm.hodg...@gmail.com
>>
>> [[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.
>>
>
> --
Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com

[[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] tibble question with a mean

2018-09-20 Thread Erin Hodgess
David
That's awesome!

Thank you!!!

Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com


On Thu, Sep 20, 2018 at 9:19 PM David L Carlson  wrote:

> > xt[, 2:3] %>% colMeans
>  y  z
>  2.500 -0.4401625
>
> > xt[2] %>% colMeans
>   y
> 2.5
> > t(xt[, 2]) %>% mean
> [1] 2.5
>
> -
> David L. Carlson
> Department of Anthropology
> Texas A University
>
> -Original Message-
> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Peter
> Langfelder
> Sent: Thursday, September 20, 2018 8:08 PM
> To: Erin Hodgess 
> Cc: r-help 
> Subject: Re: [R] tibble question with a mean
>
> I don't know tibble, so I'll do the same with a plain data frame:
>
> a =
>
> data.frame(x=LETTERS[1:4],y=1:4,z=rnorm(4),a=c("dog","cat","tree","ferret"))
> > a
>   x y   z  a
> 1 A 1 -0.08264865dog
> 2 B 2  0.32344426cat
> 3 C 3 -0.80416061   tree
> 4 D 4  1.27052529 ferret
> > mean(a[2:3])
> [1] NA
> Warning message:
> In mean.default(a[2:3]) : argument is not numeric or logical: returning NA
> > mean(as.matrix(a[2:3]))
> [1] 1.338395
>
> The reason you get an error on mean(a[2:3]) is that a[2:3] is still a data
> frame (a special list) and you cannot simply apply mean to a list. You need
> to first convert to a matrix or vector which can then be fed to mean().
>
> Peter
>
>
> On Thu, Sep 20, 2018 at 5:50 PM Erin Hodgess 
> wrote:
>
> > Hello!
> >
> > Here is a toy tibble problem:
> >
> > xt <-
> > tibble(x=LETTERS[1:4],y=1:4,z=rnorm(4),a=c("dog","cat","tree","ferret"))
> > str(xt)
> > Classes ‘tbl_df’, ‘tbl’ and 'data.frame': 4 obs. of  4 variables:
> >  $ x: chr  "A" "B" "C" "D"
> >  $ y: int  1 2 3 4
> >  $ z: num  0.3246 0.0504 0.339 0.4872
> >  $ a: chr  "dog" "cat" "tree" "ferret"
> > #No surprise
> >  xt %>% mean
> > [1] NA
> > Warning message:
> > In mean.default(.) : argument is not numeric or logical: returning NA
> > #surprised!
> > mean(xt[2:3])
> > [1] NA
> > Warning message:
> > In mean.default(xt[2:3]) : argument is not numeric or logical: returning
> NA
> >  xt[, 2:3] %>% mean
> > [1] NA
> > Warning message:
> > In mean.default(.) : argument is not numeric or logical: returning NA
> >
> > I have a feeling that I'm doing something silly wrong.  Has anyone run
> into
> > this, please?  I saw something like this on this list, but didn't see a
> > solution.
> >
> > Thanks,
> > Erin
> >
> >
> > Erin Hodgess, PhD
> > mailto: erinm.hodg...@gmail.com
> >
> > [[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.
>

[[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] [FORGED] Re: tibble question with a mean

2018-09-20 Thread Erin Hodgess
Thanks to all for the good suggestions!!!

Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com


On Thu, Sep 20, 2018 at 7:38 PM Rolf Turner  wrote:

>
> Please see inline below.
>
> n 09/21/2018 01:07 PM, Peter Langfelder wrote:
> > I don't know tibble, so I'll do the same with a plain data frame:
> >
> > a =
> >
> data.frame(x=LETTERS[1:4],y=1:4,z=rnorm(4),a=c("dog","cat","tree","ferret"))
> >> a
> >x y   z  a
> > 1 A 1 -0.08264865dog
> > 2 B 2  0.32344426cat
> > 3 C 3 -0.80416061   tree
> > 4 D 4  1.27052529 ferret
> >> mean(a[2:3])
> > [1] NA
> > Warning message:
> > In mean.default(a[2:3]) : argument is not numeric or logical: returning
> NA
> >> mean(as.matrix(a[2:3]))
> > [1] 1.338395
> >
> > The reason you get an error on mean(a[2:3]) is that a[2:3] is still a
> data
> > frame (a special list) and you cannot simply apply mean to a list. You
> need
> > to first convert to a matrix or vector which can then be fed to mean().
>
> Perhaps
>
> sapply(a[2:3],mean)?
>
> cheers,
>
> Rolf
>
> >
> > Peter
> >
> >
> > On Thu, Sep 20, 2018 at 5:50 PM Erin Hodgess 
> > wrote:
> >
> >> Hello!
> >>
> >> Here is a toy tibble problem:
> >>
> >> xt <-
> >> tibble(x=LETTERS[1:4],y=1:4,z=rnorm(4),a=c("dog","cat","tree","ferret"))
> >> str(xt)
> >> Classes ‘tbl_df’, ‘tbl’ and 'data.frame': 4 obs. of  4 variables:
> >>   $ x: chr  "A" "B" "C" "D"
> >>   $ y: int  1 2 3 4
> >>   $ z: num  0.3246 0.0504 0.339 0.4872
> >>   $ a: chr  "dog" "cat" "tree" "ferret"
> >> #No surprise
> >>   xt %>% mean
> >> [1] NA
> >> Warning message:
> >> In mean.default(.) : argument is not numeric or logical: returning NA
> >> #surprised!
> >> mean(xt[2:3])
> >> [1] NA
> >> Warning message:
> >> In mean.default(xt[2:3]) : argument is not numeric or logical:
> returning NA
> >>   xt[, 2:3] %>% mean
> >> [1] NA
> >> Warning message:
> >> In mean.default(.) : argument is not numeric or logical: returning NA
> >>
> >> I have a feeling that I'm doing something silly wrong.  Has anyone run
> into
> >> this, please?  I saw something like this on this list, but didn't see a
> >> solution.
> >>
> >> Thanks,
> >> Erin
>

[[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] tibble question with a mean

2018-09-20 Thread Erin Hodgess
Hello!

Here is a toy tibble problem:

xt <-
tibble(x=LETTERS[1:4],y=1:4,z=rnorm(4),a=c("dog","cat","tree","ferret"))
str(xt)
Classes ‘tbl_df’, ‘tbl’ and 'data.frame': 4 obs. of  4 variables:
 $ x: chr  "A" "B" "C" "D"
 $ y: int  1 2 3 4
 $ z: num  0.3246 0.0504 0.339 0.4872
 $ a: chr  "dog" "cat" "tree" "ferret"
#No surprise
 xt %>% mean
[1] NA
Warning message:
In mean.default(.) : argument is not numeric or logical: returning NA
#surprised!
mean(xt[2:3])
[1] NA
Warning message:
In mean.default(xt[2:3]) : argument is not numeric or logical: returning NA
 xt[, 2:3] %>% mean
[1] NA
Warning message:
In mean.default(.) : argument is not numeric or logical: returning NA

I have a feeling that I'm doing something silly wrong.  Has anyone run into
this, please?  I saw something like this on this list, but didn't see a
solution.

Thanks,
Erin


Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com

[[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] Using a different compiler to create a package with source code

2018-08-26 Thread Erin Hodgess
OK.  Thanks for the info!

Sincerely,
Erin

Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com


On Sun, Aug 26, 2018 at 8:44 PM Jeff Newmiller 
wrote:

> Wrong list, though you will probably need to recompile R itself and every
> other package you want to use in conjunction with this special package in
> order to do this... and you may not find many or even any people interested
> in helping as a result.
>
> On August 26, 2018 7:40:15 PM PDT, Erin Hodgess 
> wrote:
> >Hello!
> >I need to use the PGI compiler for a new package.  Should I ask here or
> >the
> >development list, please?
> >
> >Sorry for the airspace if I'm on the wrong list.
> >
> >Thanks,
> >Erin
> >
> >
> >Erin Hodgess, PhD
> >mailto: erinm.hodg...@gmail.com
> >
> >   [[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.
>
> --
> Sent from my phone. Please excuse my brevity.
>

[[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] Using a different compiler to create a package with source code

2018-08-26 Thread Erin Hodgess
Hello!
I need to use the PGI compiler for a new package.  Should I ask here or the
development list, please?

Sorry for the airspace if I'm on the wrong list.

Thanks,
Erin


Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com

[[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] as.Date() function

2018-08-21 Thread Erin Hodgess
Nice one!


On Tue, Aug 21, 2018 at 6:14 PM John Kane  wrote:

> You loaded "lubridate" so using Erin's approach
>
> library(lubridate)
> st <- c("1961-01","1961-04","1983-02")
> dat1 <- ymd(paste( st, "01",  sep ="-"))
>
>
> On Monday, August 20, 2018, 1:15:56 a.m. EDT, <
> phili...@cpanel1.stormweb.net> wrote:
>
>
> Thanks Erin and Jim. You have indeed solved my problem.
>
> Philip
>
>
> Quoting Erin Hodgess :
>
> > Hi Philip:
> >
> > Here is something to consider:
> >
> >> #potential solution:
> >> sta <- paste(st,"-01",sep="")
> >> st1 <- as.Date(sta, format=("%Y-%m-%d"))
> >> print(st1)
> > [1] "1961-01-01" "1961-04-01" "1983-02-01"
> >
> >
> > Hope this helps!
> > Erin
> >
> > Erin Hodgess, PhD
> > mailto: erinm.hodg...@gmail.com
> >
> >
> > On Sun, Aug 19, 2018 at 3:25 PM  wrote:
> >
> >> I am having trouble with what must be a very simple problem. Here is a
> >> reproducible example:
> >>
> >> library(lubridate)
> >> st <- c("1961-01","1961-04","1983-02")
> >> print(st)
> >> #[1] "1961-01" "1961-04" "1983-02"
> >> st1 <- as.Date(st, format=("%Y-%m"))
> >> print(st1)
> >> #[1] NA NA NA
> >>
> >> Why the heck am I getting three NAs instead of three Dates?I have
> >> studied the R documentation for as.Date() and it has not turned on the
> >> light bulb for me.
> >>
> >> __
> >> 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.
>
-- 
Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com

[[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] as.Date() function

2018-08-19 Thread Erin Hodgess
Hi Philip:

Here is something to consider:

> #potential solution:
> sta <- paste(st,"-01",sep="")
> st1 <- as.Date(sta, format=("%Y-%m-%d"))
> print(st1)
[1] "1961-01-01" "1961-04-01" "1983-02-01"


Hope this helps!
Erin

Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com


On Sun, Aug 19, 2018 at 3:25 PM  wrote:

> I am having trouble with what must be a very simple problem. Here is a
> reproducible example:
>
> library(lubridate)
> st <- c("1961-01","1961-04","1983-02")
> print(st)
> #[1] "1961-01" "1961-04" "1983-02"
> st1 <- as.Date(st, format=("%Y-%m"))
> print(st1)
> #[1] NA NA NA
>
> Why the heck am I getting three NAs instead of three Dates?I have
> studied the R documentation for as.Date() and it has not turned on the
> light bulb for me.
>
> __
> 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] learning tidyverse

2018-08-19 Thread Erin Hodgess
Thanks so much

e

Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com


On Sun, Aug 19, 2018 at 2:42 PM Ista Zahn  wrote:

> https://www.tidyverse.org/learn/
> On Sun, Aug 19, 2018 at 4:29 PM Erin Hodgess 
> wrote:
> >
> > Hello everyone!
> >
> > Could anyone recommend a good way to learn about tidyverse, please?  Is
> > there a book, please?
> >
> > Thanks,
> > Erin
> >
> >
> >
> > Erin Hodgess, PhD
> > mailto: erinm.hodg...@gmail.com
> >
> > [[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] learning tidyverse

2018-08-19 Thread Erin Hodgess
Hello everyone!

Could anyone recommend a good way to learn about tidyverse, please?  Is
there a book, please?

Thanks,
Erin



Erin Hodgess, PhD
mailto: erinm.hodg...@gmail.com

[[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] Rmpi fails to install

2018-07-13 Thread Erin Hodgess
Hi!

You need to have MPI in your path.

Thanks,
Erin

On Fri, Jul 13, 2018 at 4:29 PM Yufei Zhao  wrote:

> Hello!
>
> I try to install Rmpi with install.packages(“Rmpi”), but it fails:
>
> > install.packages("Rmpi")
> Package which is only available in source form, and may need compilation
> of C/C++/Fortran: ‘Rmpi’
> Do you want to attempt to install these from sources? (Yes/no/cancel) yes
> installing the source package ‘Rmpi’
>
> trying URL 'https://cran.rstudio.com/src/contrib/Rmpi_0.6-7.tar.gz'
> Content type 'application/x-gzip' length 106869 bytes (104 KB)
> ==
> downloaded 104 KB
>
> * installing *source* package ‘Rmpi’ ...
> ** package ‘Rmpi’ successfully unpacked and MD5 sums checked
> checking for gcc... clang
> 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 clang accepts -g... yes
> checking for clang option to accept ISO C89... none needed
> checking for pkg-config... no
> checking how to run the C preprocessor... clang -E
> checking for grep that handles long lines and -e... /usr/bin/grep
> checking for egrep... /usr/bin/grep -E
> checking for ANSI C header files... rm: conftest.dSYM: is a directory
> rm: conftest.dSYM: is a directory
> 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 mpi.h usability... no
> checking mpi.h presence... no
> checking for mpi.h... no
> configure: error: "Cannot find mpi.h header file"
> ERROR: configuration failed for package ‘Rmpi’
> * removing
> ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rmpi’
> Warning in install.packages :
>   installation of package ‘Rmpi’ had non-zero exit status
>
> The downloaded source packages are in
>
> ‘/private/var/folders/wd/5x8p9n_j1kx7sqqv2hk23vvmgs/T/RtmpKZ1waO/downloaded_packages’
>
>
> The systems is MacOS High Sierra 10.13.3.
>
> Thanks in advance!
>
> Best,
> Yufei
> __
> 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.
>
-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

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

2018-04-17 Thread Erin Hodgess
gt;>>>
> >>>> __
> >>>> 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-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-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.
> >
> >
> > -
> > -SECURITY/CONFIDENTIALITY WARNING-
> > This message (and any attachments) are intended solely
> > f...{{dropped:28}}
> >
> > __
> > 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-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.
>
-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] Generating help files for a function

2017-12-16 Thread Erin Hodgess
Hello everyone!

I'm in the process of writing a package, and I'm using the lovely "R
Package" book as a guideline.

However, in the midst of my work,  I discovered that I had omitted a
function and am now putting in it the package.  Not a problem.  But the
problem is the help file.  What is the best way to generate a help file
"after the fact" like that, please?

Thank you in advance.  Hope everyone is enjoying various holidays.

Sincerely,
Erin


-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] tcltk problems

2017-11-17 Thread Erin Hodgess
When I have compiled from sourced on Ubuntu, I did NOT include the
"with-tcltk" and it worked fine.  Did you try that, please?

Thanks,
Erin


On Fri, Nov 17, 2017 at 6:34 PM, Rolf Turner <r.tur...@auckland.ac.nz>
wrote:

>
> It recently came to my attention that my R installation no longer has
> tcltk capability.
>
> I can't figure out why or what to do about it.
>
> I built R from source.  I configured using the "--with-tcltk" flag.  The
> build and install *seemed* to go OK, but after realising I didn't have
> tcltk capability I looked into config.log.
>
> There I found:
>
> configure:39486: checking for tclConfig.sh
>> configure:39519: result: no
>> configure:39528: checking for tclConfig.sh in library (sub)directories
>> configure:39549: result: no
>> configure:39561: checking for tkConfig.sh
>> configure:39594: result: no
>> configure:39603: checking for tkConfig.sh in library (sub)directories
>> configure:39624: result: no
>> configure:39721: checking for tcl.h
>> conftest.c:249:17: fatal error: tcl.h: No such file or directory
>> compilation terminated.
>>
>
> I have tcl and tk (and the -dev versions) installed on my machine, and
> they are apparently up-to-date).
>
> Moreover if I do "locate tclConfig.sh" I get:
>
> /usr/lib/tcl8.6/tclConfig.sh
>> /usr/lib/x86_64-linux-gnu/tcl8.6/tclConfig.sh
>>
>
> And likewise "locate tcl.h" produces:
>
> /usr/include/tcl8.6/tcl.h
>> /usr/include/tcl8.6/tcl-private/generic/tcl.h
>>
>
> So why can't "configure" find these files, and how can I tell it where to
> find them?
>
> I'm running Ubuntu 16.04 and my last install of R was of version 3.4.2.
>
> My installation procedure always worked in the past 
>
> Thanks for any tips.
>
> cheers,
>
> Rolf Turner
>
> --
> Technical Editor ANZJS
> Department of Statistics
> University of Auckland
> Phone: +64-9-373-7599 ext. 88276
>
> __
> 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.
>



-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] FW: Time Series

2017-11-07 Thread Erin Hodgess
Hello!

What is the error message, please?

At first glance, you are using the "ts" function.  That doesn't work for
hourly frequency.

You may want to create a zoo object.

This is Round One.

Sincerely,
Erin


On Tue, Nov 7, 2017 at 1:46 AM, Emre Karagülle <karagulle...@gmail.com>
wrote:

>
> Hi,
> I would like to ask a question about time series.
> I am trying to convert my data into time series data.
> I have hourly data from “2015-12-18 00:00” to “2017-10-24 23:00”
> I am trying the following codes but they are not working.
> Could you help me out?
>
> tseri <- ts(data ,seq(from=as.POSIXct("2015-12-18 00:00:00"),
> to=as.POSIXct("2017-10-24 23:00:00"), by="hour"))
>
> tseri <- ts(data ,seq(from=as.Date("2015-12-18 00:00:00"),
> to=as.Date("2017-10-24 23:00:00"), by="hour"))
>
>
> Thank you
>
> --
> Emre
>
>
>
> [[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.




-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] really dumb question with building/creating a new package.

2017-08-17 Thread Erin Hodgess
For what it's worth, here is the solution:

install.packages(devtools)

check("RcmdrPlugin.gstats")
install("RcmdrPlugin.gstats")
library(RcmdrPlugin.gstats)

And POOF

it ran perfectly!

Thanks for all of your help.


On Thu, Aug 17, 2017 at 5:18 PM, Erin Hodgess <erinm.hodg...@gmail.com>
wrote:

> Thank you!
>
>
> On Thu, Aug 17, 2017 at 4:55 PM, Bert Gunter <bgunter.4...@gmail.com>
> wrote:
>
>> r-package-devel is probably a better place to post this, especially if
>> you do not get a satisfactory reply here. This list is about R
>> programming, as you presumably know; your query is not.
>>
>> Cheers,
>> Bert
>>
>>
>> Bert Gunter
>>
>> "The trouble with having an open mind is that people keep coming along
>> and sticking things into it."
>> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
>>
>>
>> On Thu, Aug 17, 2017 at 2:46 PM, Erin Hodgess <erinm.hodg...@gmail.com>
>> wrote:
>> > Hello.
>> >
>> > I am creating a new RcmdrPlugin package.  However, I am getting some
>> very
>> > odd messages.
>> >
>> > R CMD build RcmdrPlugin.gstats_1.0.0
>> >
>> >  ERROR
>> >
>> > cannot change to directory ‘RcmdrPlugin.gstats_1.0.0’
>> >
>> > es-macbook-air:~ emhodgess$ R CMD check RcmdrPlugin.gstats_1.0.0
>> >
>> > Warning: ‘RcmdrPlugin.gstats_1.0.0’ is neither a file nor directory,
>> > skipping
>> >
>> >
>> > es-macbook-air:~ emhodgess$ cd RcmdrPlugin.gstats/
>> >
>> > es-macbook-air:RcmdrPlugin.gstats emhodgess$ pwd
>> >
>> > /Users/emhodgess/RcmdrPlugin.gstats
>> >
>> > es-macbook-air:RcmdrPlugin.gstats emhodgess$
>> >
>> >
>> > I can neither run R CMD build nor check.  Any help truly appreciated.
>> It's
>> > been ages since I've put together a package.
>> >
>> > Thanks,
>> > Erin
>> >
>> >
>> > --
>> > Erin Hodgess
>> > Associate Professor
>> > Department of Mathematical and Statistics
>> > University of Houston - Downtown
>> > mailto: erinm.hodg...@gmail.com
>> >
>> >     [[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.
>>
>
>
>
> --
> Erin Hodgess
> Associate Professor
> Department of Mathematical and Statistics
> University of Houston - Downtown
> mailto: erinm.hodg...@gmail.com
>



-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] really dumb question with building/creating a new package.

2017-08-17 Thread Erin Hodgess
Thank you!


On Thu, Aug 17, 2017 at 4:55 PM, Bert Gunter <bgunter.4...@gmail.com> wrote:

> r-package-devel is probably a better place to post this, especially if
> you do not get a satisfactory reply here. This list is about R
> programming, as you presumably know; your query is not.
>
> Cheers,
> Bert
>
>
> Bert Gunter
>
> "The trouble with having an open mind is that people keep coming along
> and sticking things into it."
> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
>
>
> On Thu, Aug 17, 2017 at 2:46 PM, Erin Hodgess <erinm.hodg...@gmail.com>
> wrote:
> > Hello.
> >
> > I am creating a new RcmdrPlugin package.  However, I am getting some very
> > odd messages.
> >
> > R CMD build RcmdrPlugin.gstats_1.0.0
> >
> >  ERROR
> >
> > cannot change to directory ‘RcmdrPlugin.gstats_1.0.0’
> >
> > es-macbook-air:~ emhodgess$ R CMD check RcmdrPlugin.gstats_1.0.0
> >
> > Warning: ‘RcmdrPlugin.gstats_1.0.0’ is neither a file nor directory,
> > skipping
> >
> >
> > es-macbook-air:~ emhodgess$ cd RcmdrPlugin.gstats/
> >
> > es-macbook-air:RcmdrPlugin.gstats emhodgess$ pwd
> >
> > /Users/emhodgess/RcmdrPlugin.gstats
> >
> > es-macbook-air:RcmdrPlugin.gstats emhodgess$
> >
> >
> > I can neither run R CMD build nor check.  Any help truly appreciated.
> It's
> > been ages since I've put together a package.
> >
> > Thanks,
> > Erin
> >
> >
> > --
> > Erin Hodgess
> > Associate Professor
> > Department of Mathematical and Statistics
> > University of Houston - Downtown
> > mailto: erinm.hodg...@gmail.com
> >
> > [[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.
>



-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] really dumb question with building/creating a new package.

2017-08-17 Thread Erin Hodgess
Hello.

I am creating a new RcmdrPlugin package.  However, I am getting some very
odd messages.

R CMD build RcmdrPlugin.gstats_1.0.0

 ERROR

cannot change to directory ‘RcmdrPlugin.gstats_1.0.0’

es-macbook-air:~ emhodgess$ R CMD check RcmdrPlugin.gstats_1.0.0

Warning: ‘RcmdrPlugin.gstats_1.0.0’ is neither a file nor directory,
skipping


es-macbook-air:~ emhodgess$ cd RcmdrPlugin.gstats/

es-macbook-air:RcmdrPlugin.gstats emhodgess$ pwd

/Users/emhodgess/RcmdrPlugin.gstats

es-macbook-air:RcmdrPlugin.gstats emhodgess$


I can neither run R CMD build nor check.  Any help truly appreciated.  It's
been ages since I've put together a package.

Thanks,
Erin


-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] trouble with Rmpi and a new version of R on Windows.

2017-07-25 Thread Erin Hodgess
I want to put version R-3.4.1 on my Windows desktop in the office.  I have
had other versions of R on that computer and used Rmpi on them.  I deleted
all of the versions, deleted all of the directories, however, when I try to
start R (3.4.1), I get  Rmpi not found.  Can't start R.

Has anyone seen this, please?

Thanks,
Erin




-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

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

2017-06-23 Thread Erin Hodgess
Hello!

Are there any packages in R that work with the visualization tool Paraview,
please?  I looked via Google and couldn't find any but wanted to double
check before I started work on such a thing.

Thanks,
Erin


-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] finding components of an API

2017-05-28 Thread Erin Hodgess
I have actually just figured it out with some help from a JS website . Was 
going to post the solution but maybe I shouldn't ? 


Sent from my iPhone

> On May 28, 2017, at 7:51 PM, Robert Sherry <rsher...@comcast.net> wrote:
> 
> Erin,
> 
> I do not think there is an R package that will enable you to get the data you 
> would like from spotcrime.com.
> 
> You could write code, in R, or some other language, to extract the data you 
> want but that is going to be a changeling  task and if
> the website changes its format then your code may suddenly stop working. 
> Also, the people who run spotcrime.com may not be happy if you do so.
> 
> Bob
> 
>> On 5/28/2017 4:45 PM, Erin Hodgess wrote:
>> Sorry!!!
>> 
>> It's spotcrime.com, and I would like to use it via R for crimes.
>> 
>> 
>> 
>> On Sun, May 28, 2017 at 2:19 PM, Jeff Newmiller <jdnew...@dcn.davis.ca.us>
>> wrote:
>> 
>>> Can you please be just a little less vague? What API are you talking
>>> about, and how is this related to R?
>>> --
>>> Sent from my phone. Please excuse my brevity.
>>> 
>>> On May 28, 2017 11:48:42 AM PDT, Erin Hodgess <erinm.hodg...@gmail.com>
>>> wrote:
>>>> Hello!
>>>> 
>>>> I would like to use a particular API for crimes (spot crimes) but I
>>>> can't
>>>> find what components go into the API.  I have gone into the website,but
>>>> to
>>>> no avail
>>>> 
>>>> Has anyone used it please?
>>>> 
>>>> Thank you,
>>>> Sincerely,
>>>> Erin
>> 
>> 
> 
> __
> 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] finding components of an API

2017-05-28 Thread Erin Hodgess
Sorry!!!

It's spotcrime.com, and I would like to use it via R for crimes.



On Sun, May 28, 2017 at 2:19 PM, Jeff Newmiller <jdnew...@dcn.davis.ca.us>
wrote:

> Can you please be just a little less vague? What API are you talking
> about, and how is this related to R?
> --
> Sent from my phone. Please excuse my brevity.
>
> On May 28, 2017 11:48:42 AM PDT, Erin Hodgess <erinm.hodg...@gmail.com>
> wrote:
> >Hello!
> >
> >I would like to use a particular API for crimes (spot crimes) but I
> >can't
> >find what components go into the API.  I have gone into the website,but
> >to
> >no avail
> >
> >Has anyone used it please?
> >
> >Thank you,
> >Sincerely,
> >Erin
>



-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] finding components of an API

2017-05-28 Thread Erin Hodgess
Hello!

I would like to use a particular API for crimes (spot crimes) but I can't
find what components go into the API.  I have gone into the website,but to
no avail

Has anyone used it please?

Thank you,
Sincerely,
Erin


-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] Setting up workers with Rmpi: SOLVED for Ubuntu

2017-03-18 Thread Erin Hodgess
Hello!

I found the answer in a very fine book by Prof. Norm Matloff.  There is a
section on Rmpi on this exact topic for Linux on pages 192-193.  So I
followed those instructions, and I'm set.

Thanks though!


-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] Setting up workers with Rmpi

2017-03-18 Thread Erin Hodgess
Hello!


I'm trying to run a very simple test with Rmpi via the mpirun function
outside of R.  Here is the script file:


Es-MacBook-Pro:~ emhodgess$ cat bb.in

library(Rmpi)

x <- 5

mpi.remote.exec(rnorm(x))

mpi.finalize()



And here is the output:

Es-MacBook-Pro:~ emhodgess$ mpirun -np 4 Rscript bb.in

Error in mpi.remote.exec(rnorm(x)) : It seems no slaves running.

Execution halted

Error in mpi.remote.exec(rnorm(x)) : It seems no slaves running.

Execution halted

Error in mpi.remote.exec(rnorm(x)) : It seems no slaves running.

Execution halted

---

Primary job  terminated normally, but 1 process returned

a non-zero exit code.. Per user-direction, the job has been aborted.

---

--

mpirun detected that one or more processes exited with non-zero status,
thus causing

the job to be terminated. The first process to do so was:


  Process name: [[39079,1],2]

  Exit code:1

--

I had always thought that the numbers of workers was obtained from the np
value and passed through to R.  Apparently not.

Here is the session info:
> sessionInfo()
R version 3.3.3 (2017-03-06)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: macOS Sierra 10.12.3

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.6   lattice_0.20-34   codetools_0.2-15
 [4] mvtnorm_1.0-5 zoo_1.7-13MASS_7.3-45
 [7] grid_3.3.3plyr_1.8.4fBasics_3011.87
[10] xtable_1.8-2  nlme_3.1-131  fGarch_3010.82.1
[13] coda_0.18-1   estimability_1.2  lsmeans_2.25
[16] multcomp_1.4-6timeDate_3012.100 rpart_4.1-10
[19] Matrix_1.2-8  sandwich_2.3-4splines_3.3.3
[22] TH.data_1.0-7 tools_3.3.3   rsm_2.8
[25] survival_2.40-1   timeSeries_3022.101.2
>

I also did the same thing on my Ubuntu laptop; same results.

Any suggestions much appreciated.

Sincerely,
Erin


-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] double subscripts with Greek letter

2017-01-01 Thread Erin Hodgess
Hello!

Here is a solution:

> plot(1:10)
> xa <- expression(A[list(alpha,beta)])
> title(xa)



On Sun, Jan 1, 2017 at 1:22 PM, Jeff Shane <honolulush...@gmail.com> wrote:

> Hi all,
>
> I have a question which seems trivial but simply cannot figure out its
> solution.
>
> I want to type A_{\alpha,\beta} in the title of a plot. Uwe once pointed
> out a solution
>
> expression(A[alpha*beta])
>
> But the output of the above command does not include the "," in the
> subscript. Is there a way to solve my question? Thanks so much!
>
> Regards,
> Jeff
>
> [[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.
>



-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] problem installing Rmpi

2016-12-15 Thread Erin Hodgess
At the risk of sounding simplistic, do you have MPI installed, please?

On Thu, Dec 15, 2016 at 2:08 AM, Jim Maas <jimmaa...@gmail.com> wrote:

> Can anyone tell me to start looking to fix this, when attempting to install
> Rmpi on Ubuntu 16.04, just updated R version to 3.3.2
>
>
> ** building package indices
> ** testing if installed package can be loaded
> Error in system2(file.path(R.home("bin"), "R"), c(if (nzchar(arch))
> paste0("--arch=",  :
>   error in running command
> * removing ‘/usr/local/lib/R/site-library/Rmpi’
>
> ​Thanks, J​
>
> --
> Jim Maas
>
> [[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.




-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] abline with zoo series

2016-11-24 Thread Erin Hodgess
Nice!  That's perfect!

Thanks very much!

Sincerely,
Erin

On Thu, Nov 24, 2016 at 11:27 PM, Gabor Grothendieck <
ggrothendi...@gmail.com> wrote:

> Recessions are typically shown by shading.  The zoo package has
> xblocks for this purpose.  If app1 is your zoo object then:
>
> plot(app1)
> tt <- time(app1)
> xblocks(tt, tt >= "1990-07-01" & tt <= "1991-03-31",
>col = rgb(0.7, 0.7, 0.7, 0.5)) # transparent grey
>
> See ?xblocks for more info.
>
>
>
> On Thu, Nov 24, 2016 at 10:03 PM, Erin Hodgess <erinm.hodg...@gmail.com>
> wrote:
> > Hello!  Happy Thanksgiving to those who are celebrating.
> >
> > I have a zoo series that I am plotting, and I would like to have some
> > vertical lines at certain points, to indicate US business cycles.  Here
> is
> > an example:
> >
> > app1 <- get.hist.quote(instrument="appl",
> > start="1985-01-01",end="2016-08-31", quote="AdjClose", compression="m")
> > #Fine
> > plot(app1,main="Historical Stock Prices: Apple Corporation")
> > #Still Fine
> > #Now I want to use abline at July 1990 and March 1991 (as a start) for
> > business cycles.  I tried v=67 and v="1990-07", no good.
> >
> > I have a feeling that it's really simple and I'm just not seeing it.
> >
> > Any help much appreciated.
> >
> > Thanks,
> > Erin
> >
> >
> > --
> > Erin Hodgess
> > Associate Professor
> > Department of Mathematical and Statistics
> > University of Houston - Downtown
> > mailto: erinm.hodg...@gmail.com
> >
> > [[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.
>
>
>
> --
> Statistics & Software Consulting
> GKX Group, GKX Associates Inc.
> tel: 1-877-GKX-GROUP
> email: ggrothendieck at gmail.com
>



-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] abline with zoo series

2016-11-24 Thread Erin Hodgess
Awesome
Thanks!

Sincerely,
Erin


On Thu, Nov 24, 2016 at 10:14 PM, David Winsemius <dwinsem...@comcast.net>
wrote:

>
> > On Nov 24, 2016, at 7:03 PM, Erin Hodgess <erinm.hodg...@gmail.com>
> wrote:
> >
> > Hello!  Happy Thanksgiving to those who are celebrating.
> >
> > I have a zoo series that I am plotting, and I would like to have some
> > vertical lines at certain points, to indicate US business cycles.  Here
> is
> > an example:
> >
>
> library(tseries)
> > app1 <- get.hist.quote(instrument="aapl",  # note correction
> > start="1985-01-01",end="2016-08-31", quote="AdjClose", compression="m")
> > #Fine
> > plot(app1,main="Historical Stock Prices: Apple Corporation")
> > #Still Fine
> > #Now I want to use abline at July 1990 and March 1991 (as a start) for
> > business cycles.  I tried v=67 and v="1990-07", no good.
>
> #Try this:
>
> abline( v= as.Date("1990-07-01") )
>
> The x-axis is being created using the Date class values and formatting.
>
>
> >
> > I have a feeling that it's really simple and I'm just not seeing it.
> >
> > Any help much appreciated.
> >
> > Thanks,
> > Erin
> >
> >
> > --
> > Erin Hodgess
> > Associate Professor
> > Department of Mathematical and Statistics
> > University of Houston - Downtown
> > mailto: erinm.hodg...@gmail.com
> >
> >   [[alternative HTML version deleted]]
>
> Sigh.
>
> >
> > __________
> > 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
>
>


-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] abline with zoo series

2016-11-24 Thread Erin Hodgess
Hello!  Happy Thanksgiving to those who are celebrating.

I have a zoo series that I am plotting, and I would like to have some
vertical lines at certain points, to indicate US business cycles.  Here is
an example:

app1 <- get.hist.quote(instrument="appl",
start="1985-01-01",end="2016-08-31", quote="AdjClose", compression="m")
#Fine
plot(app1,main="Historical Stock Prices: Apple Corporation")
#Still Fine
#Now I want to use abline at July 1990 and March 1991 (as a start) for
business cycles.  I tried v=67 and v="1990-07", no good.

I have a feeling that it's really simple and I'm just not seeing it.

Any help much appreciated.

Thanks,
Erin


-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] a book recommendation, please [O/T]

2016-11-07 Thread Erin Hodgess
I like BH^2 as well as a reference book!  I actually think I will go with
the DOE with R by Larson.  Thanks to all for the help!

Sincerely,
Erin


On Mon, Nov 7, 2016 at 10:59 PM, Bert Gunter <bgunter.4...@gmail.com> wrote:

> Have you looked here:
>
> https://www.amazon.com/s/ref=sr_pg_2?rh=n%3A283155%2Ck%
> 3Aexperimental+design=2=experimental+design&
> ie=UTF8=1478580868
>
> I would think your choice depends strongly on the arena of application.
>
> Of course I like BH^2, but that was because I was taught by them.
>
> Cheers,
> Bert
> Bert Gunter
>
> "The trouble with having an open mind is that people keep coming along
> and sticking things into it."
> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
>
>
> On Mon, Nov 7, 2016 at 8:13 PM, Erin Hodgess <erinm.hodg...@gmail.com>
> wrote:
> > Hello!
> >
> > Could someone recommend a good book on Design of Experiments for a
> Master's
> > in Data Analytics, please?
> >
> > I use Montgomery's book for my undergrad course, but was thinking about
> > something a little more advanced for this one.
> >
> > Any help much appreciated, particularly with R-related texts.
> >
> > Sincerely,
> > Erin
> >
> >
> > --
> > Erin Hodgess
> > Associate Professor
> > Department of Mathematical and Statistics
> > University of Houston - Downtown
> > mailto: erinm.hodg...@gmail.com
> >
> > [[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.
>



-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] a book recommendation, please [O/T]

2016-11-07 Thread Erin Hodgess
Hello!

Could someone recommend a good book on Design of Experiments for a Master's
in Data Analytics, please?

I use Montgomery's book for my undergrad course, but was thinking about
something a little more advanced for this one.

Any help much appreciated, particularly with R-related texts.

Sincerely,
Erin


-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] To submit R jobs via SLURM

2016-10-03 Thread Erin Hodgess
Get a SLURM batch file from someone there and make the appropriate changes
to it.  Best way to learn.



On Mon, Oct 3, 2016 at 2:10 PM, Dominik Schneider <dosc3...@colorado.edu>
wrote:

> I typically call Rscript inside an sbatch file.
>
> *batch_r.sh*
> #! /bin/bash
>
> cd /home//aso_regression_project #make sure you change to your
> correct working directory
> Rscript scripts/run_splitsample-modeling.R
>
>
> and on the commandline of the login node:
> sbatch batch_r.sh
>
>
> There are lots of slurm configurations you can specify. Google for them.
> Just add these under the first line and modify as needed:
> #SBATCH --qos=
> #SBATCH --mem=
> #SBATCH --mail-type=begin,end,abort
> #SBATCH --mail-user=use...@email.com
> #SBATCH --time=
> #SBATCH --nodes=
> #SBATCH --job-name=myjob
> #SBATCH --output=/home//run-%A_%a.Sout #special output filename
>
>
> Dominik
>
>
> On Mon, Oct 3, 2016 at 3:03 AM, Sema Atasever <s.atase...@gmail.com>
> wrote:
>
> > Dear Authorized Sir / Madam,
> >
> > I have an R script file in which it includes this lines:
> >
> > How can i to submit this R jobs via SLURM? Thanks in advance.
> >
> > *testscript.R*
> > data=read.table("seqDist.50", header=FALSE)[-1]
> > attach(data)
> > d=as.matrix(data)
> > library(cluster)
> > cluster.pam = pam(d,6)
> > table(cluster.pam$clustering)
> >
> > filenameclu = paste("outputfile", ".txt")
> > write.table(cluster.pam$clustering, file=outputfile,sep=",")
> >
> > [[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.
>



-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] Pass an optional argument from Fortran subroutine to a R wrapper

2016-09-07 Thread Erin Hodgess
Hello!
You can't really pass the matrix as a matrix.  Send it as a vector,
re-construct it in the Fortran program.

Actually, if it's a covariance matrix and symmetric, you may be able to get
away with just sending part of the matrix.  For example, if you have the
following:

covmat<- matrix(c(1,0.9,0.81,0.9,1,0.9,0.81,0.9,1),nrow=3,ncol=3,byrow=TRUE)

cov1 <- covmat[1:3]



Then pass cov1 as a numeric.


It's easier and faster to manipulate your covariance matrix in the Fortran
program.


Hope this helps.


Sincerely,

Erin

On Tue, Sep 6, 2016 at 2:51 PM, Kodalore Vijayan, Vineetha W <vwk...@mun.ca>
wrote:

> Hello,
>
> I have a Fortran subroutine which uses an optional argument in the call.
>
> subroutine data (n,ns,alpha,covmat,x,y)
>
> integer, intent(in):: n,ns
> double precision, intent(in)  :: alpha
> double precision, intent(in), optional ::covmat(n,ns)
> double precision, intent(out) :: x(n),y(n)
> 
> end subroutine data
>
> I tried the following R wrapper for this subroutine and got an error
> saying,
>
>  Error in array(x, c(length(x), 1L), if (!is.null(names(x)))
> list(names(x), :
> 'data' must be of a vector type, was 'NULL'
>
> I'm not sure if I passed the arguments correctly in the .Fortran() call. I
> couldn't find anything helpful online. I would really appreciate any
> help/comments.
>
> data1 <- function(n,ns,alpha,covmat=NULL){
>
> tmp <- .Fortran("data",
> n = as.integer(n),ns= as.integer(ns)
> alpha=as.numeric(alpha),covmat=as.matrix(covmat),
> x=as.double(rep(0,n)),y=as.double(rep(0,n)))
> )
>  }
> result <- list(x=tmp$x, y=tmp$y)
>
> return(result)
> }
>
> Thanks,
> Vineetha
>
> [[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.
>



-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] Solution to my own question

2016-07-17 Thread Erin Hodgess
write.table(format(x2,drop0trailing=FALSE),file="",col.name=FALSE,row.name
=FALSE,quote=FALSE)

-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] writing a matrix to a file with trailing zeroes

2016-07-17 Thread Erin Hodgess
Hello everyone!

I'm looking at this problem, and I'm sure there is a straightforward
solution.  I have a matrix and some of the values have zeroes to the right
of the decimal point.  When I write these to a file, the zeroes disappear.
The material below is what I have tried so far.



> x2
  x  y
[1,] -1.3611521  5.000
[2,] -0.8521120 -1.0512976
[3,] -0.9652820 -0.1306795
[4,] -0.4319187  1.2483199
[5,] -0.7548402  1.3404867
[6,]  6.000  2.500

>write.table(sprintf("%.1f",t(x2)),row.name=FALSE,col.name=FALSE,file="")
"-1.4"
"5.0"
"-0.9"
"-1.1"
"-1.0"
"-0.1"
"-0.4"
"1.2"
"-0.8"
"1.3"
"6.0"
"2.5"
> write(sprintf("%.1f",t(x2)),file="")
-1.4
5.0
-0.9
-1.1
-1.0
-0.1
-0.4
1.2
-0.8
1.3
6.0
2.5
> write(round(t(x2),1),file="")
-1.4 5 -0.9 -1.1 -1
-0.1 -0.4 1.2 -0.8 1.3
6 2.5
> write(round(t(x2),1),file="",ncol=2)
-1.4 5
-0.9 -1.1
-1 -0.1
-0.4 1.2
-0.8 1.3
6 2.5
>


Still no luck.  I need the 5 in the first line to be 5.0 and the 6 in the
last line to be 6.0.

Any suggestions, please?

Thanks,
Erin

-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] a package-building opinion question, please

2016-07-08 Thread Erin Hodgess
Hello everyone:

I'm starting to write a package from scratch; having done that in ages.

My opinion question:  what is the best way, please:  Should I use R studio,
please?  Back in the back, I used package.skeleton, or just copied over
other people's stuff.  But I want to do a nice clean one from the beginning.

For the record, I will have S4 classes.

And I'm sure I will get many differing answering, but that's good too!

Sort of like those "if you put 1000 statisticians end to end" jokes.

Thanks in advance,
Have a great weekend,
Sincerely,
Erin


-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] Using Fortran with MPI, RInside, and calling R functions

2016-02-27 Thread Erin Hodgess
Got it.  thanks.


On Sat, Feb 27, 2016 at 2:39 PM, peter dalgaard <pda...@gmail.com> wrote:

> Yeah, well, not much harm done, but once compilers are involved, r-devel
> is usually preferred over r-help.
>
> -pd
>
> > On 27 Feb 2016, at 21:30 , Erin Hodgess <erinm.hodg...@gmail.com> wrote:
> >
> > Sorry...thought it was ok since it uses RInside and Rcpp.
> >
> >
> > On Sat, Feb 27, 2016 at 2:15 PM, Jeff Newmiller <
> jdnew...@dcn.davis.ca.us>
> > wrote:
> >
> >> This is off topic here... wrong audience. Read the Posting Guide.
> >> --
> >> Sent from my phone. Please excuse my brevity.
> >>
> >> On February 27, 2016 12:00:23 PM PST, Erin Hodgess <
> >> erinm.hodg...@gmail.com> wrote:
> >>
> >>> Hello again.
> >>>
> >>> This time, I would like to add MPI to my Fortran program.  Here are the
> >>> Fortran and C++ codes:
> >>>
> >>> program buzzy
> >>>   use iso_c_binding
> >>>  implicit none
> >>>  include '/opt/openmpi/include/mpif.h'
> >>>
> >>>
> >>>
> >>>
> >>>  integer :: rank,size,ierror,tag,status(MPI_STATUS_SIZE), i,np
> >>>  integer :: argc = 100
> >>>  real :: x,tot1
> >>>  character(len=32) :: argv
> >>>
> >>>
> >>>  INTERFACE
> >>> SUBROUTINE R_FUN(argc,argv) bind(C, name="buzzyC")
> >>>   use iso_c_binding
> >>>character(kind=c_char), INTENT(INOUT) :: argv
> >>>INTEGER(kind=c_int), INTENT(IN) :: argc
> >>>
> >>>  END SUBROUTINE R_FUN
> >>>END INTERFACE
> >>>
> >>>  call MPI_INIT(ierror)
> >>>  call MPI_COMM_SIZE(MPI_COMM_WORLD,size,ierror)
> >>>  call MPI_COMM_RANK(MPI_COMM_WORLD,rank,ierror)
> >>>
> >>>
> >>>
> >>>
> >>>print *, "Fortran Calling RInside",rank
> >>>CALL
> >>> R_FUN (argc,argv)
> >>>print *,rank
> >>>
> >>>call MPI_FINALIZE(ierror)
> >>>
> >>>  end program buzzy
> >>>
> >>> and
> >>>
> >>> #include 
> >>> #include 
> >>>
> >>> void buzzyC_(int argc,char *argv[]);
> >>>
> >>> extern "C" void buzzyC(int argc,char *argv[]) {
> >>>
> >>>// create an embedded R instance
> >>>  RInside R(argc,argv);
> >>>
> >>>// convert to string for RInside assignment
> >>>
> >>>
> >>>// eval the string, give R notice
> >>>  R.parseEvalQ("cat(mean(rnorm(argc))");
> >>> }
> >>>
> >>> Now my steps for compiling and linking are the following:
> >>>
> >>> erin@erin-Bonobo-Extreme:~$ mpif90 -c buzzy.f90
> >>> erin@erin-Bonobo-Extreme:~$ mpic++ buzzyC.cpp -c
> >>> -I/home/erin/R/x86_64-pc-linux-gnu-library/3.2/RInside/include
> >>> -I/home/erin/R/x86_64-pc-linux-gnu-library/3.2/Rcpp/include
> >>> -I/usr/share/R/include -libstdc++
> >>> erin@erin-Bonobo-Extreme:~$ mpifort -o fcra buzzy.o buzzyC.o
> >>> -L/usr/lib/R/lib -lR
> >>> -L
> >>> /home/erin/R/x86_64-pc-linux-gnu-library/3.2/RInside/lib -lRInside
> >>> -L/home/erin/R/x86_64-pc-linux-gnu-library/3.2/Rcpp/libs/
> >>> -Wl,-rpath,/home/erin/R/x86_64-pc-linux-gnu-library/3.2/RInside/lib/
> >>> -lRInside
> >>> -Wl,-rpath,/home/erin/R/x86_64-pc-linux-gnu-library/3.2/Rcpp/libs/
> -lstdc++
> >>> /usr/lib/x86_64-linux-gnu/libstdc++.so.6
> >>>
> >>> So far so good
> >>> But when I run this, disaster strikes:
> >>>
> >>> erin@erin-Bonobo-Extreme:~$ mpirun -np 4 ./fcra
> >>> Fortran Calling RInside   0
> >>> Fortran Calling RInside   1
> >>> Fortran Calling RInside   3
> >>> Fortran Calling RInside   2
> >>>
> >>> Program received signal SIGSEGV: Segmentation fault - invalid memory
> >>> reference.
> >>>
> >>> Backtrace for this error:
> >>>
> >>> Program received signal SIGSEGV: Segmentation fault - invalid memory
> >>> reference.
> >>>
> >>> Backtrace for this error:
> >>> #0  0x7F

Re: [R] Using Fortran with MPI, RInside, and calling R functions

2016-02-27 Thread Erin Hodgess
Sorry...thought it was ok since it uses RInside and Rcpp.


On Sat, Feb 27, 2016 at 2:15 PM, Jeff Newmiller <jdnew...@dcn.davis.ca.us>
wrote:

> This is off topic here... wrong audience. Read the Posting Guide.
> --
> Sent from my phone. Please excuse my brevity.
>
> On February 27, 2016 12:00:23 PM PST, Erin Hodgess <
> erinm.hodg...@gmail.com> wrote:
>
>> Hello again.
>>
>> This time, I would like to add MPI to my Fortran program.  Here are the
>> Fortran and C++ codes:
>>
>> program buzzy
>>use iso_c_binding
>>   implicit none
>>   include '/opt/openmpi/include/mpif.h'
>>
>>
>>
>>
>>   integer :: rank,size,ierror,tag,status(MPI_STATUS_SIZE), i,np
>>   integer :: argc = 100
>>   real :: x,tot1
>>   character(len=32) :: argv
>>
>>
>>   INTERFACE
>>  SUBROUTINE R_FUN(argc,argv) bind(C, name="buzzyC")
>>use iso_c_binding
>> character(kind=c_char), INTENT(INOUT) :: argv
>> INTEGER(kind=c_int), INTENT(IN) :: argc
>>
>>   END SUBROUTINE R_FUN
>> END INTERFACE
>>
>>   call MPI_INIT(ierror)
>>   call MPI_COMM_SIZE(MPI_COMM_WORLD,size,ierror)
>>   call MPI_COMM_RANK(MPI_COMM_WORLD,rank,ierror)
>>
>>
>>
>>
>> print *, "Fortran Calling RInside",rank
>> CALL
>> R_FUN (argc,argv)
>> print *,rank
>>
>> call MPI_FINALIZE(ierror)
>>
>>   end program buzzy
>>
>> and
>>
>> #include 
>> #include 
>>
>> void buzzyC_(int argc,char *argv[]);
>>
>> extern "C" void buzzyC(int argc,char *argv[]) {
>>
>> // create an embedded R instance
>>   RInside R(argc,argv);
>>
>> // convert to string for RInside assignment
>>
>>
>> // eval the string, give R notice
>>   R.parseEvalQ("cat(mean(rnorm(argc))");
>> }
>>
>> Now my steps for compiling and linking are the following:
>>
>> erin@erin-Bonobo-Extreme:~$ mpif90 -c buzzy.f90
>> erin@erin-Bonobo-Extreme:~$ mpic++ buzzyC.cpp -c
>> -I/home/erin/R/x86_64-pc-linux-gnu-library/3.2/RInside/include
>> -I/home/erin/R/x86_64-pc-linux-gnu-library/3.2/Rcpp/include
>> -I/usr/share/R/include -libstdc++
>> erin@erin-Bonobo-Extreme:~$ mpifort -o fcra buzzy.o buzzyC.o
>> -L/usr/lib/R/lib -lR
>> -L
>> /home/erin/R/x86_64-pc-linux-gnu-library/3.2/RInside/lib -lRInside
>> -L/home/erin/R/x86_64-pc-linux-gnu-library/3.2/Rcpp/libs/
>> -Wl,-rpath,/home/erin/R/x86_64-pc-linux-gnu-library/3.2/RInside/lib/
>> -lRInside
>> -Wl,-rpath,/home/erin/R/x86_64-pc-linux-gnu-library/3.2/Rcpp/libs/ -lstdc++
>> /usr/lib/x86_64-linux-gnu/libstdc++.so.6
>>
>> So far so good
>> But when I run this, disaster strikes:
>>
>> erin@erin-Bonobo-Extreme:~$ mpirun -np 4 ./fcra
>>  Fortran Calling RInside   0
>>  Fortran Calling RInside   1
>>  Fortran Calling RInside   3
>>  Fortran Calling RInside   2
>>
>> Program received signal SIGSEGV: Segmentation fault - invalid memory
>> reference.
>>
>> Backtrace for this error:
>>
>> Program received signal SIGSEGV: Segmentation fault - invalid memory
>> reference.
>>
>> Backtrace for this error:
>> #0  0x7FC59706CE48
>> #1  0x7FC59706BFD0
>> #2  0x7FC596AA52EF
>> #3
>> 0x7FC596AFB69A
>> #4  0x7FC597C5E8E8
>> #5  0x7FC5979671E8
>> #6  0x7FC5979677A1
>> #7  0x402A55 in buzzyC
>> #8  0x402891 in MAIN__ at buzzy.f90:?
>> #0  0x7F2482294E48
>> #1  0x7F2482293FD0
>> #2  0x7F2481CCD2EF
>> #3  0x7F2481D2369A
>> #4  0x7F2482E868E8
>> #5  0x7F2482B8F1E8
>> #6  0x7F2482B8F7A1
>> #7  0x402A55 in buzzyC
>> #8  0x402891 in MAIN__ at buzzy.f90:?
>> --
>>
>> mpirun noticed that process rank 1 with PID 2188 on node
>> erin-Bonobo-Extreme exited on signal 11 (Segmentation fault).
>> --
>>
>> erin@erin-Bonobo-Extreme:~$
>>
>> Maybe I should be asking:  is this even possible, please?
>>
>> Thanks,
>> Erin
>>
>>


-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] Using Fortran with MPI, RInside, and calling R functions

2016-02-27 Thread Erin Hodgess
Hello again.

This time, I would like to add MPI to my Fortran program.  Here are the
Fortran and C++ codes:

program buzzy
   use iso_c_binding
  implicit none
  include '/opt/openmpi/include/mpif.h'




  integer :: rank,size,ierror,tag,status(MPI_STATUS_SIZE), i,np
  integer :: argc = 100
  real :: x,tot1
  character(len=32) :: argv


  INTERFACE
 SUBROUTINE R_FUN(argc,argv) bind(C, name="buzzyC")
   use iso_c_binding
character(kind=c_char), INTENT(INOUT) :: argv
INTEGER(kind=c_int), INTENT(IN) :: argc

  END SUBROUTINE R_FUN
END INTERFACE

  call MPI_INIT(ierror)
  call MPI_COMM_SIZE(MPI_COMM_WORLD,size,ierror)
  call MPI_COMM_RANK(MPI_COMM_WORLD,rank,ierror)




print *, "Fortran Calling RInside",rank
CALL R_FUN (argc,argv)
print *,rank

call MPI_FINALIZE(ierror)

  end program buzzy

and

#include 
#include 

void buzzyC_(int argc,char *argv[]);

extern "C" void buzzyC(int argc,char *argv[]) {

// create an embedded R instance
  RInside R(argc,argv);

// convert to string for RInside assignment


// eval the string, give R notice
  R.parseEvalQ("cat(mean(rnorm(argc))");
}

Now my steps for compiling and linking are the following:

erin@erin-Bonobo-Extreme:~$ mpif90 -c buzzy.f90
erin@erin-Bonobo-Extreme:~$ mpic++ buzzyC.cpp -c
-I/home/erin/R/x86_64-pc-linux-gnu-library/3.2/RInside/include
-I/home/erin/R/x86_64-pc-linux-gnu-library/3.2/Rcpp/include
-I/usr/share/R/include -libstdc++
erin@erin-Bonobo-Extreme:~$ mpifort -o fcra buzzy.o buzzyC.o
-L/usr/lib/R/lib -lR -L
/home/erin/R/x86_64-pc-linux-gnu-library/3.2/RInside/lib -lRInside
-L/home/erin/R/x86_64-pc-linux-gnu-library/3.2/Rcpp/libs/
-Wl,-rpath,/home/erin/R/x86_64-pc-linux-gnu-library/3.2/RInside/lib/
-lRInside
-Wl,-rpath,/home/erin/R/x86_64-pc-linux-gnu-library/3.2/Rcpp/libs/ -lstdc++
/usr/lib/x86_64-linux-gnu/libstdc++.so.6

So far so good
But when I run this, disaster strikes:

erin@erin-Bonobo-Extreme:~$ mpirun -np 4 ./fcra
 Fortran Calling RInside   0
 Fortran Calling RInside   1
 Fortran Calling RInside   3
 Fortran Calling RInside   2

Program received signal SIGSEGV: Segmentation fault - invalid memory
reference.

Backtrace for this error:

Program received signal SIGSEGV: Segmentation fault - invalid memory
reference.

Backtrace for this error:
#0  0x7FC59706CE48
#1  0x7FC59706BFD0
#2  0x7FC596AA52EF
#3  0x7FC596AFB69A
#4  0x7FC597C5E8E8
#5  0x7FC5979671E8
#6  0x7FC5979677A1
#7  0x402A55 in buzzyC
#8  0x402891 in MAIN__ at buzzy.f90:?
#0  0x7F2482294E48
#1  0x7F2482293FD0
#2  0x7F2481CCD2EF
#3  0x7F2481D2369A
#4  0x7F2482E868E8
#5  0x7F2482B8F1E8
#6  0x7F2482B8F7A1
#7  0x402A55 in buzzyC
#8  0x402891 in MAIN__ at buzzy.f90:?
--
mpirun noticed that process rank 1 with PID 2188 on node
erin-Bonobo-Extreme exited on signal 11 (Segmentation fault).
--
erin@erin-Bonobo-Extreme:~$

Maybe I should be asking:  is this even possible, please?

Thanks,
Erin


-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] calling R functions from Fortran via RInside?

2016-02-26 Thread Erin Hodgess
Please ignore previous message.  I recompiled, and linked.  Then things
worked.  For what it's worth, here are the steps.



* g++ testC.cpp -c
-I/home/erin/R/x86_64-pc-linux-gnu-library/3.2/RInside/include
-I/home/erin/R/x86_64-pc-linux-gnu-library/3.2/Rcpp/include
-I/usr/share/R/include*g++ -o fcr testF.o testC.o -L/usr/lib/R/lib -lR -L
/home/erin/R/x86_64-pc-linux-gnu-library/3.2/RInside/lib -lRInside
-L/home/erin/R/x86_64-pc-linux-gnu-library/3.2/Rcpp/libs/
-Wl,-rpath,/home/erin/R/x86_64-pc-linux-gnu-library/3.2/RInside/lib/
-lRInside
-Wl,-rpath,/home/erin/R/x86_64-pc-linux-gnu-library/3.2/Rcpp/libs/
-lgfortran

 ./fcr
 Fortran Calling RInside
This is C++, Hello World
This is R,  Hello World


On Fri, Feb 26, 2016 at 10:38 PM, Erin Hodgess <erinm.hodg...@gmail.com>
wrote:

> Hello everyone.
>
> Hope you are having a nice weekend.
>
> Is it possible to call R functions from a Fortran program, possibly via
> RInside and Rcpp, please?
>
> I tried the following that I saw on stack overflow.  Here is the cpp:
>
> #include 
> #include 
>
> void helloR_(int argc, char *argv[], const char *msg);
>
> extern "C" void helloR(int argc, char *argv[], const char *msg) {
>
> // create an embedded R instance
> RInside R(argc, argv);
>
> // convert to string for RInside assignment
> std::string txt = std::string(msg);
>
> // C++ Notice
> std::cout << "This is C++, " << txt << std::endl;
>
> // Assign string to R object
> R.assign(txt, "txt");
>
> // eval the string, give R notice
> R.parseEvalQ("cat('This is R, ', txt, '\n')");
> }
>
> And here is the Fortran code:
>
>  PROGRAM MAIN
> USE iso_c_binding
> IMPLICIT NONE
> INTEGER :: argc
> CHARACTER(len=32) :: arg
> CHARACTER(len=32) :: msg
>
> INTERFACE
>   SUBROUTINE R_FUN(argc, arg, msg) bind(C, name="helloR")
> USE iso_c_binding
> INTEGER(kind=c_int), INTENT(IN) :: argc
> CHARACTER(kind=c_char), INTENT(IN) :: arg(*)
> CHARACTER(kind = C_CHAR), INTENT(IN) :: msg(*)
>   END SUBROUTINE R_FUN
> END INTERFACE
>
> print *, "Fortran Calling RInside"
> CALL R_FUN (argc, arg, "Hello World"//C_NULL_CHAR)
>
>   END PROGRAM MAIN
>
> I compiled each, did the linking (according to the stack overflow), but
> the program locked up when I ran it.
>
> This is on an Ubuntu 15.10 laptop, R 3.2.3
>
> Thank you,
> Sincerely,
> Erin
>
>
>
> --
> Erin Hodgess
> Associate Professor
> Department of Mathematical and Statistics
> University of Houston - Downtown
> mailto: erinm.hodg...@gmail.com
>



-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] calling R functions from Fortran via RInside?

2016-02-26 Thread Erin Hodgess
Hello everyone.

Hope you are having a nice weekend.

Is it possible to call R functions from a Fortran program, possibly via
RInside and Rcpp, please?

I tried the following that I saw on stack overflow.  Here is the cpp:

#include 
#include 

void helloR_(int argc, char *argv[], const char *msg);

extern "C" void helloR(int argc, char *argv[], const char *msg) {

// create an embedded R instance
RInside R(argc, argv);

// convert to string for RInside assignment
std::string txt = std::string(msg);

// C++ Notice
std::cout << "This is C++, " << txt << std::endl;

// Assign string to R object
R.assign(txt, "txt");

// eval the string, give R notice
R.parseEvalQ("cat('This is R, ', txt, '\n')");
}

And here is the Fortran code:

 PROGRAM MAIN
USE iso_c_binding
IMPLICIT NONE
INTEGER :: argc
CHARACTER(len=32) :: arg
CHARACTER(len=32) :: msg

INTERFACE
  SUBROUTINE R_FUN(argc, arg, msg) bind(C, name="helloR")
USE iso_c_binding
INTEGER(kind=c_int), INTENT(IN) :: argc
CHARACTER(kind=c_char), INTENT(IN) :: arg(*)
CHARACTER(kind = C_CHAR), INTENT(IN) :: msg(*)
  END SUBROUTINE R_FUN
END INTERFACE

print *, "Fortran Calling RInside"
CALL R_FUN (argc, arg, "Hello World"//C_NULL_CHAR)

  END PROGRAM MAIN

I compiled each, did the linking (according to the stack overflow), but the
program locked up when I ran it.

This is on an Ubuntu 15.10 laptop, R 3.2.3

Thank you,
Sincerely,
Erin



-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] PDF form Rstudio

2016-02-25 Thread Erin Hodgess
What's the error?  You have to show it and the Rmd too, please.



On Thu, Feb 25, 2016 at 5:35 PM, Alnazer Elbedairy <
alnazer.elbeda...@gmail.com> wrote:

> Dear All
> I did the following steps to get a PDF file from Rstudio
> 1- activate Rmarkdown
> 2- save file as (name.Rmd)
> 3- use chunk for each step
> 4- go to Knit - PDF to save a file as PDF but I got an error
> any help please
>
> [[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.
>



-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] Combining a character array into a character string

2016-02-07 Thread Erin Hodgess
Hello everyone!

I'm sure this is very simple and that I'm just having "forest and trees"
syndrome.

I have the following character array:

> xxy
[1] "A" "G" "C" "G" "T"

I want to end up with
"AGCGT:"

I've tried paste, paste0, gsub, no good.

Any suggestions much appreciated.

Thanks and have a great day!

Sincerely,
Erin


-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] Combining a character array into a character string

2016-02-07 Thread Erin Hodgess
Back again.

I ran the paste with collapse and it worked this time.

Spooky.

Sorry for the trouble.
Erin


On Sun, Feb 7, 2016 at 3:24 PM, Erin Hodgess <erinm.hodg...@gmail.com>
wrote:

> Hello everyone!
>
> I'm sure this is very simple and that I'm just having "forest and trees"
> syndrome.
>
> I have the following character array:
>
> > xxy
> [1] "A" "G" "C" "G" "T"
>
> I want to end up with
> "AGCGT:"
>
> I've tried paste, paste0, gsub, no good.
>
> Any suggestions much appreciated.
>
> Thanks and have a great day!
>
> Sincerely,
> Erin
>
>
> --
> Erin Hodgess
> Associate Professor
> Department of Mathematical and Statistics
> University of Houston - Downtown
> mailto: erinm.hodg...@gmail.com
>



-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] Correct notation for functions, packages when using LaTex

2015-12-10 Thread Erin Hodgess
Great,
Thanks!
Erin


On Thu, Dec 10, 2015 at 11:14 AM, Kevin E. Thorpe <kevin.tho...@utoronto.ca>
wrote:

> On 12/10/2015 12:10 PM, Erin Hodgess wrote:
>
>> Hello everyone!
>>
>> I am writing up something (quickly) using LaTex and periodically refer to
>> R
>> functions and packages.
>>
>> What is the correct way to put those into LaTex, please?  I know that R
>> itself is {\tt R}, but am not sure about the others.
>>
>> Thanks for any help,
>> Sincerely,
>> Erin
>> PS  Or should I just be doing this in R Studio, even though there is no
>> code, please?
>>
>>
>>
> When I refer to R function in a LaTeX document I tend to use \texttt{}
> (same as your {\tt } construct). Historical convention rendered computer
> code in a monospace font (akin to Courier) so that's what I follow.
>
> --
> Kevin E. Thorpe
> Head of Biostatistics,  Applied Health Research Centre (AHRC)
> Li Ka Shing Knowledge Institute of St. Michael's
> Assistant Professor, Dalla Lana School of Public Health
> University of Toronto
> email: kevin.tho...@utoronto.ca  Tel: 416.864.5776  Fax: 416.864.3016
>



-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] Correct notation for functions, packages when using LaTex

2015-12-10 Thread Erin Hodgess
Hello everyone!

I am writing up something (quickly) using LaTex and periodically refer to R
functions and packages.

What is the correct way to put those into LaTex, please?  I know that R
itself is {\tt R}, but am not sure about the others.

Thanks for any help,
Sincerely,
Erin
PS  Or should I just be doing this in R Studio, even though there is no
code, please?


-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] using Fortran with R

2015-11-06 Thread Erin Hodgess
Hello everyone!

Could someone recommend a good reference for Fortran with R, please?  I
know that Dirk has an excellent book for C/C++, but I feel more comfortable
with Fortran (I'm old school, maybe just old!)

Thank you very much in advance,
Sincerely,
Erin


-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] using Fortran with R

2015-11-06 Thread Erin Hodgess
Great..thanks for the package names.  I was going to use the "Writing R
Extensions" but wanted some more material as well.  Looking at the other
packages might just do the trick.

Thanks,
Erin


On Fri, Nov 6, 2015 at 10:59 AM, Berend Hasselman <b...@xs4all.nl> wrote:

>
> > On 6 Nov 2015, at 17:23, Erin Hodgess <erinm.hodg...@gmail.com> wrote:
> >
> > Hello everyone!
> >
> > Could someone recommend a good reference for Fortran with R, please?  I
> > know that Dirk has an excellent book for C/C++, but I feel more
> comfortable
> > with Fortran (I'm old school, maybe just old!)
> >
>
> I don't know about a book.
> The best you can do is read Writing R Extensions.
> And have a look at packages using Fortran:  nleqslv, geigen, QZ, deSolve,
> minpack.lm, PEIP
> That should give you a good idea how to use Fortran.
> There are surely more but these are the ones I know about.
>
> Berend
>
> > Thank you very much in advance,
> > Sincerely,
> > Erin
> >
> >
> > --
> > Erin Hodgess
> > Associate Professor
> > Department of Mathematical and Statistics
> > University of Houston - Downtown
> > mailto: erinm.hodg...@gmail.com
> >
> >   [[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.
>
>


-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] using Fortran with R

2015-11-06 Thread Erin Hodgess
Awesome!
Thanks!


On Fri, Nov 6, 2015 at 2:09 PM, Eduardo M. A. M.Mendes <emammen...@gmail.com
> wrote:

> Dear Erin
>
> I have written some packages using my old fortran source codes.   Nothing
> fancy as the ones in CRAN but they do what they suppose to do.  If you are
> interested in checking a very simple package using a fortran code, please
> look at https://github.com/emammendes/mittagleffler , an R-package to
> deal with Mittag-Leffler functions (fractional differential equations).
>
> Cheers
>
> Ed
>
>
>
> On Nov 6, 2015, at 3:17 PM, Erin Hodgess <erinm.hodg...@gmail.com> wrote:
>
> Great..thanks for the package names.  I was going to use the "Writing R
> Extensions" but wanted some more material as well.  Looking at the other
> packages might just do the trick.
>
> Thanks,
> Erin
>
>
> On Fri, Nov 6, 2015 at 10:59 AM, Berend Hasselman <b...@xs4all.nl> wrote:
>
>
> On 6 Nov 2015, at 17:23, Erin Hodgess <erinm.hodg...@gmail.com> wrote:
>
> Hello everyone!
>
> Could someone recommend a good reference for Fortran with R, please?  I
> know that Dirk has an excellent book for C/C++, but I feel more
>
> comfortable
>
> with Fortran (I'm old school, maybe just old!)
>
>
> I don't know about a book.
> The best you can do is read Writing R Extensions.
> And have a look at packages using Fortran:  nleqslv, geigen, QZ, deSolve,
> minpack.lm, PEIP
> That should give you a good idea how to use Fortran.
> There are surely more but these are the ones I know about.
>
> Berend
>
> Thank you very much in advance,
> Sincerely,
> Erin
>
>
> --
> Erin Hodgess
> Associate Professor
> Department of Mathematical and Statistics
> University of Houston - Downtown
> mailto: erinm.hodg...@gmail.com
>
>  [[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.
>
>
>
>
>
> --
> Erin Hodgess
> Associate Professor
> Department of Mathematical and Statistics
> University of Houston - Downtown
> mailto: erinm.hodg...@gmail.com
>
> [[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.
>
>
>


-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] using Fortran with R

2015-11-06 Thread Erin Hodgess
This is greatI have wonderful ideas/examples to work with.

Thanks to all!


On Fri, Nov 6, 2015 at 2:13 PM, ProfJCNash <profjcn...@gmail.com> wrote:

> It's not a full book on the issue, but I have some material in "speeding
> things up" in my book on Nonlinear parameter estimation tools in R. I
> suspect the examples are the useful bit.
>
> JN
>
> On 15-11-06 12:17 PM, Erin Hodgess wrote:
> > Great..thanks for the package names.  I was going to use the "Writing R
> > Extensions" but wanted some more material as well.  Looking at the other
> > packages might just do the trick.
> >
> > Thanks,
> > Erin
> >
> >
> > On Fri, Nov 6, 2015 at 10:59 AM, Berend Hasselman <b...@xs4all.nl> wrote:
> >
> >>
> >>> On 6 Nov 2015, at 17:23, Erin Hodgess <erinm.hodg...@gmail.com> wrote:
> >>>
> >>> Hello everyone!
> >>>
> >>> Could someone recommend a good reference for Fortran with R, please?  I
> >>> know that Dirk has an excellent book for C/C++, but I feel more
> >> comfortable
> >>> with Fortran (I'm old school, maybe just old!)
> >>>
> >>
> >> I don't know about a book.
> >> The best you can do is read Writing R Extensions.
> >> And have a look at packages using Fortran:  nleqslv, geigen, QZ,
> deSolve,
> >> minpack.lm, PEIP
> >> That should give you a good idea how to use Fortran.
> >> There are surely more but these are the ones I know about.
> >>
> >> Berend
> >>
> >>> Thank you very much in advance,
> >>> Sincerely,
> >>> Erin
> >>>
> >>>
> >>> --
> >>> Erin Hodgess
> >>> Associate Professor
> >>> Department of Mathematical and Statistics
> >>> University of Houston - Downtown
> >>> mailto: erinm.hodg...@gmail.com
> >>>
> >>>   [[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.
> >>
> >>
> >
> >
>



-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] Looking for a more elegant solution than a loop

2015-10-26 Thread Erin Hodgess
Beautiful

Thanks so much!
Erin


On Mon, Oct 26, 2015 at 8:47 PM, Fox, John <j...@mcmaster.ca> wrote:

> Dear Erin,
>
> How about
>
> > x <- 6:9
> > as.list(x)
> [[1]]
> [1] 6
>
> [[2]]
> [1] 7
>
> [[3]]
> [1] 8
>
> [[4]]
> [1] 9
>
> Best,
>  John
>
> -
> John Fox, Professor
> McMaster University
> Hamilton, Ontario
> Canada L8S 4M4
> Web: socserv.mcmaster.ca/jfox
>
>
>
> > -Original Message-
> > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Erin
> > Hodgess
> > Sent: October 26, 2015 9:32 PM
> > To: R help <r-h...@stat.math.ethz.ch>
> > Subject: [R] Looking for a more elegant solution than a loop
> >
> > Hello!
> >
> > The following (which is a toy example) works fine, but I wonder if there
> is a
> > better or more elegant way than to do the loop:
> >
> >  xz <- vector("list",length=4)
> >  x <- 6:9
> >  for(i in 1:4)xz[[i]] <- x[i]
> >  xz
> > [[1]]
> > [1] 6
> >
> > [[2]]
> > [1] 7
> >
> > [[3]]
> > [1] 8
> >
> > [[4]]
> > [1] 9
> >
> > This does exactly what I want, but the "for" loop seems out of place.
> > Maybe not.
> >
> > Thanks,
> > Sincerely
> > Erin
> >
> >
> > --
> > Erin Hodgess
> > Associate Professor
> > Department of Mathematical and Statistics University of Houston -
> > Downtown
> > mailto: erinm.hodg...@gmail.com
> >
> >   [[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.
>



-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] Looking for a more elegant solution than a loop

2015-10-26 Thread Erin Hodgess
Hello!

The following (which is a toy example) works fine, but I wonder if there is
a better or more elegant way than to do the loop:

 xz <- vector("list",length=4)
 x <- 6:9
 for(i in 1:4)xz[[i]] <- x[i]
 xz
[[1]]
[1] 6

[[2]]
[1] 7

[[3]]
[1] 8

[[4]]
[1] 9

This does exactly what I want, but the "for" loop seems out of place.
Maybe not.

Thanks,
Sincerely
Erin


-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] creating a list based on various mean values

2015-10-23 Thread Erin Hodgess
Hello!

I would like to create a list of random values, based on various means.
Here are the potential mean values:

> k1
 [1]  0.005  0.200  0.300  0.400  0.500  0.600  0.700  0.800  0.900  1.000
 1.100  1.200  1.300  1.400
[15]  1.500  1.600  1.700  1.800  1.900  2.000  5.000 10.000

There are 22 of them.

My original thought was to use "do.call" to produce a list of 22 items of
size 20.

> xr <- do.call("rnorm",args=list(n=20,mean=k1))
> xr
 [1] -1.46443269  0.83384389  0.39176720 -0.17954959  0.28245948
-0.44148055  1.98009926  1.73881739
 [9]  1.37312454  1.40509257 -0.03762214  0.43636354  1.82175069
 1.96439065  2.71731752  1.02388062
[17]  1.20732047  3.08650964  0.87910868  0.13018727
>

However, I am just getting back one set of size 20.  What am I doing wrong,
please? Or do I need to do a loop, please?  I thought that there must be a
more elegant solution.

This is on a Macbook Air, R version 3.2.2

Thanks so much,
Sincerely

-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

[[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] Rgui not working in Windows Version 8.1

2015-07-06 Thread Erin Hodgess
I have tried that already...no luck.

Thank you though!
Sincerely,
Erin


On Mon, Jul 6, 2015 at 8:22 AM, John C Frain fra...@gmail.com wrote:

 I am running

 R version 3.2.1 Patched (2015-07-02 r68625) -- World-Famous Astronaut
 Copyright (C) 2015 The R Foundation for Statistical Computing
 Platform: x86_64-w64-mingw32/x64 (64-bit)

 and do not have any problems with Rgui. The output from Sys.info() is

  Sys.info()
sysnamereleaseversion   nodenamemachine
  Windows7 x64   build 9200  DELL745   x86-64

 I don't know why the release is given as  7 x64 because I am running
 Windows 8.1 Professional on this PC.  If you have not already done so I
 would uninstall R and reinstall it to see if that solves the problem.


 John C Frain
 3 Aranleigh Park
 Rathfarnham
 Dublin 14
 Ireland
 www.tcd.ie/Economics/staff/frainj/home.html
 mailto:fra...@tcd.ie
 mailto:fra...@gmail.com

 On 6 July 2015 at 02:14, Erin Hodgess erinm.hodg...@gmail.com wrote:

 Hello everyone!

 I have been having trouble with Rgui on a Windows machine running Version
 8.1.  I download the binary from CRAN.  It installs fine.  But when I try
 to run it, the console opens for a moment, and then it disappears.

 I believe this was on the Windows FAQ list.  I was wondering if there was
 any fix/patch please.

 This is true for R Version 3.2.0 and 3.2.1.

 Thank you,
 Sincerely,
 Erin


 --
 Erin Hodgess
 Associate Professor
 Department of Mathematical and Statistics
 University of Houston - Downtown
 mailto: erinm.hodg...@gmail.com

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





-- 
Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

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


  1   2   3   4   5   6   >