Installing package into...

classic Classic list List threaded Threaded
36 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Installing package into...

Steven Yen-2
I install package using either the command line or Tools -> Install
packages... (in RStudio) and get a non-fatal message saying...
Installing package into ‘C:/Users/xuhaer/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
I know it is not a fatal message. But, is there a way to do a cleaner
installation without getting such message? Thanks.

--
[hidden email]


        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Installing package into...

Duncan Murdoch-2
On 12/03/2019 11:05 a.m., Steven Yen wrote:
> I install package using either the command line or Tools -> Install
> packages... (in RStudio) and get a non-fatal message saying...
> Installing package into ‘C:/Users/xuhaer/Documents/R/win-library/3.5’
> (as ‘lib’ is unspecified)
> I know it is not a fatal message. But, is there a way to do a cleaner
> installation without getting such message? Thanks.
>

Have you tried specifying the library?  Then R wouldn't tell you its guess.

Duncan Murdoch

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Installing package into...

Michael Dewey-3
In reply to this post by Steven Yen-2
Dear Steven

If you use install,packages() from within R there is a lib argument. I
do not use RStudio so not sure how it works there.

Michael

On 12/03/2019 15:05, Steven Yen wrote:
> I install package using either the command line or Tools -> Install
> packages... (in RStudio) and get a non-fatal message saying...
> Installing package into ‘C:/Users/xuhaer/Documents/R/win-library/3.5’
> (as ‘lib’ is unspecified)
> I know it is not a fatal message. But, is there a way to do a cleaner
> installation without getting such message? Thanks.
>

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

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Installing package into...

Rui Barradas
Hello,

Yes, the lib argument works in RStudio.

Hope this helps,

Rui Barradas

Às 16:24 de 12/03/2019, Michael Dewey escreveu:

> Dear Steven
>
> If you use install,packages() from within R there is a lib argument. I
> do not use RStudio so not sure how it works there.
>
> Michael
>
> On 12/03/2019 15:05, Steven Yen wrote:
>> I install package using either the command line or Tools -> Install
>> packages... (in RStudio) and get a non-fatal message saying...
>> Installing package into ‘C:/Users/xuhaer/Documents/R/win-library/3.5’
>> (as ‘lib’ is unspecified)
>> I know it is not a fatal message. But, is there a way to do a cleaner
>> installation without getting such message? Thanks.
>>
>

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Problem with random numbers/seed

Steven Yen
In reply to this post by Steven Yen-2
Dear all,
I did all this work with older R (R-3.5.3.patched and older)
but now with R3.6 I cannot replicate the results.
Below I sample 60 observations from 1:500 using the sample command with
a random seed of 123. I get different results. Advice appreciated.
Steven Yen

 > # Run under R-3.6.0
 > x<-1:500
 > set.seed(12345671)
 > j<-sample(1:length(x),size=60); y<-x[j]
 > summary(y)
    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
    26.0   134.2   240.0   249.8   368.0   500.0

 > # Run under R-3.5.3.patched
 > x<-1:500
 > set.seed(12345671)
 > j<-sample(1:length(x),size=60); y<-x[j]
 > summary(y)
    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
     9.0   122.2   205.0   236.1   364.2   493.0

--
[hidden email] (S.T. Yen)


        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with random numbers/seed

Uwe Ligges-3
See the NEWS, the RNG has been changed, use RNGversion

On 21.06.2019 18:10, Steven Yen wrote:

> Dear all,
> I did all this work with older R (R-3.5.3.patched and older)
> but now with R3.6 I cannot replicate the results.
> Below I sample 60 observations from 1:500 using the sample command with
> a random seed of 123. I get different results. Advice appreciated.
> Steven Yen
>
>   > # Run under R-3.6.0
>   > x<-1:500
>   > set.seed(12345671)
>   > j<-sample(1:length(x),size=60); y<-x[j]
>   > summary(y)
>      Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
>      26.0   134.2   240.0   249.8   368.0   500.0
>
>   > # Run under R-3.5.3.patched
>   > x<-1:500
>   > set.seed(12345671)
>   > j<-sample(1:length(x),size=60); y<-x[j]
>   > summary(y)
>      Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
>       9.0   122.2   205.0   236.1   364.2   493.0
>


Under R-3.6.0  use, e.g.
RNGversion("3.5.2")
to get reproducible results from the older RNG.

Best,
Uwe Ligges

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with random numbers/seed

Steven Yen
Thanks. Somewhat of a mystery. The older version I had was R-3.5.3patched.
I cannot get the RNGversion command to run. Can you help? Thanks.

On 6/22/2019 12:25 AM, Uwe Ligges wrote:

> See the NEWS, the RNG has been changed, use RNGversion
>
> On 21.06.2019 18:10, Steven Yen wrote:
>> Dear all,
>> I did all this work with older R (R-3.5.3.patched and older)
>> but now with R3.6 I cannot replicate the results.
>> Below I sample 60 observations from 1:500 using the sample command with
>> a random seed of 123. I get different results. Advice appreciated.
>> Steven Yen
>>
>>   > # Run under R-3.6.0
>>   > x<-1:500
>>   > set.seed(12345671)
>>   > j<-sample(1:length(x),size=60); y<-x[j]
>>   > summary(y)
>>      Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
>>      26.0   134.2   240.0   249.8   368.0   500.0
>>
>>   > # Run under R-3.5.3.patched
>>   > x<-1:500
>>   > set.seed(12345671)
>>   > j<-sample(1:length(x),size=60); y<-x[j]
>>   > summary(y)
>>      Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
>>       9.0   122.2   205.0   236.1   364.2   493.0
>>
>
>
> Under R-3.6.0  use, e.g.
> RNGversion("3.5.2")
> to get reproducible results from the older RNG.
>
> Best,
> Uwe Ligges
>
>

--
[hidden email] (S.T. Yen)


        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with random numbers/seed

Uwe Ligges-3
What does not work?


For me it works under R-3.6.0:

  x<-1:500
  set.seed(12345671)
  j<-sample(1:length(x),size=60); y<-x[j]
  summary(j)

  RNGversion("3.5.3")
  set.seed(12345671)
  j<-sample(1:length(x),size=60); y<-x[j]
  summary(j)


Now I get the results you got udner the old R.

Best,
Uwe Ligges



On 21.06.2019 18:39, Steven Yen wrote:

> Thanks. Somewhat of a mystery. The older version I had was R-3.5.3patched.
> I cannot get the RNGversion command to run. Can you help? Thanks.
>
> On 6/22/2019 12:25 AM, Uwe Ligges wrote:
>> See the NEWS, the RNG has been changed, use RNGversion
>>
>> On 21.06.2019 18:10, Steven Yen wrote:
>>> Dear all,
>>> I did all this work with older R (R-3.5.3.patched and older)
>>> but now with R3.6 I cannot replicate the results.
>>> Below I sample 60 observations from 1:500 using the sample command with
>>> a random seed of 123. I get different results. Advice appreciated.
>>> Steven Yen
>>>
>>>   > # Run under R-3.6.0
>>>   > x<-1:500
>>>   > set.seed(12345671)
>>>   > j<-sample(1:length(x),size=60); y<-x[j]
>>>   > summary(y)
>>>      Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
>>>      26.0   134.2   240.0   249.8   368.0   500.0
>>>
>>>   > # Run under R-3.5.3.patched
>>>   > x<-1:500
>>>   > set.seed(12345671)
>>>   > j<-sample(1:length(x),size=60); y<-x[j]
>>>   > summary(y)
>>>      Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
>>>       9.0   122.2   205.0   236.1   364.2   493.0
>>>
>>
>>
>> Under R-3.6.0  use, e.g.
>> RNGversion("3.5.2")
>> to get reproducible results from the older RNG.
>>
>> Best,
>> Uwe Ligges
>>
>>
>
> --
> [hidden email]  (S.T. Yen)
>

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with random numbers/seed

Steven Yen
Now I see that results were replicated but running RNGversion
I get a warning message. Isn't there a way to do this clean?

> RNGversion("3.5.3") Warning message: In RNGkind("Mersenne-Twister",
"Inversion", "Rounding") : non-uniform 'Rounding' sampler used


On 6/22/2019 1:03 AM, Uwe Ligges wrote:

> What does not work?
>
>
> For me it works under R-3.6.0:
>
>  x<-1:500
>  set.seed(12345671)
>  j<-sample(1:length(x),size=60); y<-x[j]
>  summary(j)
>
>  RNGversion("3.5.3")
>  set.seed(12345671)
>  j<-sample(1:length(x),size=60); y<-x[j]
>  summary(j)
>
>
> Now I get the results you got udner the old R.
>
> Best,
> Uwe Ligges
>
>
>
> On 21.06.2019 18:39, Steven Yen wrote:
>> Thanks. Somewhat of a mystery. The older version I had was
>> R-3.5.3patched.
>> I cannot get the RNGversion command to run. Can you help? Thanks.
>>
>> On 6/22/2019 12:25 AM, Uwe Ligges wrote:
>>> See the NEWS, the RNG has been changed, use RNGversion
>>>
>>> On 21.06.2019 18:10, Steven Yen wrote:
>>>> Dear all,
>>>> I did all this work with older R (R-3.5.3.patched and older)
>>>> but now with R3.6 I cannot replicate the results.
>>>> Below I sample 60 observations from 1:500 using the sample command
>>>> with
>>>> a random seed of 123. I get different results. Advice appreciated.
>>>> Steven Yen
>>>>
>>>>   > # Run under R-3.6.0
>>>>   > x<-1:500
>>>>   > set.seed(12345671)
>>>>   > j<-sample(1:length(x),size=60); y<-x[j]
>>>>   > summary(y)
>>>>      Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
>>>>      26.0   134.2   240.0   249.8   368.0   500.0
>>>>
>>>>   > # Run under R-3.5.3.patched
>>>>   > x<-1:500
>>>>   > set.seed(12345671)
>>>>   > j<-sample(1:length(x),size=60); y<-x[j]
>>>>   > summary(y)
>>>>      Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
>>>>       9.0   122.2   205.0   236.1   364.2   493.0
>>>>
>>>
>>>
>>> Under R-3.6.0  use, e.g.
>>> RNGversion("3.5.2")
>>> to get reproducible results from the older RNG.
>>>
>>> Best,
>>> Uwe Ligges
>>>
>>>
>>
>> --
>> [hidden email]  (S.T. Yen)
>>
>

--
[hidden email] (S.T. Yen)


        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with random numbers/seed

Uwe Ligges-3


On 21.06.2019 19:09, Steven Yen wrote:
> Now I see that results were replicated but running RNGversion
> I get a warning message. Isn't there a way to do this clean?

Well, the old RNG is known to be not optimal, hence we give a warning if
you choose the old one. This is the clean way if you really want to get
the old (slightly buggy) behaviour.

Best,
Uwe Ligges

>
>> RNGversion("3.5.3") Warning message: In RNGkind("Mersenne-Twister",
> "Inversion", "Rounding") : non-uniform 'Rounding' sampler used
>
>
> On 6/22/2019 1:03 AM, Uwe Ligges wrote:
>> What does not work?
>>
>>
>> For me it works under R-3.6.0:
>>
>>   x<-1:500
>>   set.seed(12345671)
>>   j<-sample(1:length(x),size=60); y<-x[j]
>>   summary(j)
>>
>>   RNGversion("3.5.3")
>>   set.seed(12345671)
>>   j<-sample(1:length(x),size=60); y<-x[j]
>>   summary(j)
>>
>>
>> Now I get the results you got udner the old R.
>>
>> Best,
>> Uwe Ligges
>>
>>
>>
>> On 21.06.2019 18:39, Steven Yen wrote:
>>> Thanks. Somewhat of a mystery. The older version I had was
>>> R-3.5.3patched.
>>> I cannot get the RNGversion command to run. Can you help? Thanks.
>>>
>>> On 6/22/2019 12:25 AM, Uwe Ligges wrote:
>>>> See the NEWS, the RNG has been changed, use RNGversion
>>>>
>>>> On 21.06.2019 18:10, Steven Yen wrote:
>>>>> Dear all,
>>>>> I did all this work with older R (R-3.5.3.patched and older)
>>>>> but now with R3.6 I cannot replicate the results.
>>>>> Below I sample 60 observations from 1:500 using the sample command
>>>>> with
>>>>> a random seed of 123. I get different results. Advice appreciated.
>>>>> Steven Yen
>>>>>
>>>>>    > # Run under R-3.6.0
>>>>>    > x<-1:500
>>>>>    > set.seed(12345671)
>>>>>    > j<-sample(1:length(x),size=60); y<-x[j]
>>>>>    > summary(y)
>>>>>       Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
>>>>>       26.0   134.2   240.0   249.8   368.0   500.0
>>>>>
>>>>>    > # Run under R-3.5.3.patched
>>>>>    > x<-1:500
>>>>>    > set.seed(12345671)
>>>>>    > j<-sample(1:length(x),size=60); y<-x[j]
>>>>>    > summary(y)
>>>>>       Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
>>>>>        9.0   122.2   205.0   236.1   364.2   493.0
>>>>>
>>>>
>>>>
>>>> Under R-3.6.0  use, e.g.
>>>> RNGversion("3.5.2")
>>>> to get reproducible results from the older RNG.
>>>>
>>>> Best,
>>>> Uwe Ligges
>>>>
>>>>
>>>
>>> --
>>> [hidden email]  (S.T. Yen)
>>>
>>
>

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with random numbers/seed

Steven Yen
Unhappy but thanks.
Steven

On 6/22/2019 1:13 AM, Uwe Ligges wrote:

>
>
> On 21.06.2019 19:09, Steven Yen wrote:
>> Now I see that results were replicated but running RNGversion
>> I get a warning message. Isn't there a way to do this clean?
>
> Well, the old RNG is known to be not optimal, hence we give a warning
> if you choose the old one. This is the clean way if you really want to
> get the old (slightly buggy) behaviour.
>
> Best,
> Uwe Ligges
>
>>
>>> RNGversion("3.5.3") Warning message: In RNGkind("Mersenne-Twister",
>> "Inversion", "Rounding") : non-uniform 'Rounding' sampler used
>>
>>
>> On 6/22/2019 1:03 AM, Uwe Ligges wrote:
>>> What does not work?
>>>
>>>
>>> For me it works under R-3.6.0:
>>>
>>>   x<-1:500
>>>   set.seed(12345671)
>>>   j<-sample(1:length(x),size=60); y<-x[j]
>>>   summary(j)
>>>
>>>   RNGversion("3.5.3")
>>>   set.seed(12345671)
>>>   j<-sample(1:length(x),size=60); y<-x[j]
>>>   summary(j)
>>>
>>>
>>> Now I get the results you got udner the old R.
>>>
>>> Best,
>>> Uwe Ligges
>>>
>>>
>>>
>>> On 21.06.2019 18:39, Steven Yen wrote:
>>>> Thanks. Somewhat of a mystery. The older version I had was
>>>> R-3.5.3patched.
>>>> I cannot get the RNGversion command to run. Can you help? Thanks.
>>>>
>>>> On 6/22/2019 12:25 AM, Uwe Ligges wrote:
>>>>> See the NEWS, the RNG has been changed, use RNGversion
>>>>>
>>>>> On 21.06.2019 18:10, Steven Yen wrote:
>>>>>> Dear all,
>>>>>> I did all this work with older R (R-3.5.3.patched and older)
>>>>>> but now with R3.6 I cannot replicate the results.
>>>>>> Below I sample 60 observations from 1:500 using the sample command
>>>>>> with
>>>>>> a random seed of 123. I get different results. Advice appreciated.
>>>>>> Steven Yen
>>>>>>
>>>>>>    > # Run under R-3.6.0
>>>>>>    > x<-1:500
>>>>>>    > set.seed(12345671)
>>>>>>    > j<-sample(1:length(x),size=60); y<-x[j]
>>>>>>    > summary(y)
>>>>>>       Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
>>>>>>       26.0   134.2   240.0   249.8   368.0   500.0
>>>>>>
>>>>>>    > # Run under R-3.5.3.patched
>>>>>>    > x<-1:500
>>>>>>    > set.seed(12345671)
>>>>>>    > j<-sample(1:length(x),size=60); y<-x[j]
>>>>>>    > summary(y)
>>>>>>       Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
>>>>>>        9.0   122.2   205.0   236.1   364.2   493.0
>>>>>>
>>>>>
>>>>>
>>>>> Under R-3.6.0  use, e.g.
>>>>> RNGversion("3.5.2")
>>>>> to get reproducible results from the older RNG.
>>>>>
>>>>> Best,
>>>>> Uwe Ligges
>>>>>
>>>>>
>>>>
>>>> --
>>>> [hidden email]  (S.T. Yen)
>>>>
>>>
>>
>

--
[hidden email] (S.T. Yen)


        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: [External] Re: Problem with random numbers/seed

Tierney, Luke
Maybe looking at ?suppressWarnings will make you feel better.

Best,

luke

On Fri, 21 Jun 2019, Steven Yen wrote:

> Unhappy but thanks.
> Steven
>
> On 6/22/2019 1:13 AM, Uwe Ligges wrote:
>>
>>
>> On 21.06.2019 19:09, Steven Yen wrote:
>>> Now I see that results were replicated but running RNGversion
>>> I get a warning message. Isn't there a way to do this clean?
>>
>> Well, the old RNG is known to be not optimal, hence we give a warning
>> if you choose the old one. This is the clean way if you really want to
>> get the old (slightly buggy) behaviour.
>>
>> Best,
>> Uwe Ligges
>>
>>>
>>>> RNGversion("3.5.3") Warning message: In RNGkind("Mersenne-Twister",
>>> "Inversion", "Rounding") : non-uniform 'Rounding' sampler used
>>>
>>>
>>> On 6/22/2019 1:03 AM, Uwe Ligges wrote:
>>>> What does not work?
>>>>
>>>>
>>>> For me it works under R-3.6.0:
>>>>
>>>>   x<-1:500
>>>>   set.seed(12345671)
>>>>   j<-sample(1:length(x),size=60); y<-x[j]
>>>>   summary(j)
>>>>
>>>>   RNGversion("3.5.3")
>>>>   set.seed(12345671)
>>>>   j<-sample(1:length(x),size=60); y<-x[j]
>>>>   summary(j)
>>>>
>>>>
>>>> Now I get the results you got udner the old R.
>>>>
>>>> Best,
>>>> Uwe Ligges
>>>>
>>>>
>>>>
>>>> On 21.06.2019 18:39, Steven Yen wrote:
>>>>> Thanks. Somewhat of a mystery. The older version I had was
>>>>> R-3.5.3patched.
>>>>> I cannot get the RNGversion command to run. Can you help? Thanks.
>>>>>
>>>>> On 6/22/2019 12:25 AM, Uwe Ligges wrote:
>>>>>> See the NEWS, the RNG has been changed, use RNGversion
>>>>>>
>>>>>> On 21.06.2019 18:10, Steven Yen wrote:
>>>>>>> Dear all,
>>>>>>> I did all this work with older R (R-3.5.3.patched and older)
>>>>>>> but now with R3.6 I cannot replicate the results.
>>>>>>> Below I sample 60 observations from 1:500 using the sample command
>>>>>>> with
>>>>>>> a random seed of 123. I get different results. Advice appreciated.
>>>>>>> Steven Yen
>>>>>>>
>>>>>>>    > # Run under R-3.6.0
>>>>>>>    > x<-1:500
>>>>>>>    > set.seed(12345671)
>>>>>>>    > j<-sample(1:length(x),size=60); y<-x[j]
>>>>>>>    > summary(y)
>>>>>>>       Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
>>>>>>>       26.0   134.2   240.0   249.8   368.0   500.0
>>>>>>>
>>>>>>>    > # Run under R-3.5.3.patched
>>>>>>>    > x<-1:500
>>>>>>>    > set.seed(12345671)
>>>>>>>    > j<-sample(1:length(x),size=60); y<-x[j]
>>>>>>>    > summary(y)
>>>>>>>       Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
>>>>>>>        9.0   122.2   205.0   236.1   364.2   493.0
>>>>>>>
>>>>>>
>>>>>>
>>>>>> Under R-3.6.0  use, e.g.
>>>>>> RNGversion("3.5.2")
>>>>>> to get reproducible results from the older RNG.
>>>>>>
>>>>>> Best,
>>>>>> Uwe Ligges
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> [hidden email]  (S.T. Yen)
>>>>>
>>>>
>>>
>>
>
>

--
Luke Tierney
Ralph E. Wareham Professor of Mathematical Sciences
University of Iowa                  Phone:             319-335-3386
Department of Statistics and        Fax:               319-335-3017
    Actuarial Science
241 Schaeffer Hall                  email:   [hidden email]
Iowa City, IA 52242                 WWW:  http://www.stat.uiowa.edu
______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Problem witth nnet:multinom

Al Koholic
I am using R with the nnet package to perform a multinomial logistic  
regression on a training dataset with ~5800 training dataset records  
and 45 predictor variables in that training data. Predictor variables  
were chosen as a subset of all ~120 available variables based on PCA  
analysis. My target variable is a factor with 10 items.
All predictor variable are numeric (type "dbl").

My command in R is as follows:

model <- nnet:multinom(frmla, data = training_set, maxit = 1000,  
na.action = na.omit)

#note that the frmla string is a value of "Target_Variable ~ v1 + v2 +  
v3, etc."
Output of this command is as follows (I will truncate to save a little  
space after the first few rows):

# weights: 360 (308 variable)
initial value 10912.909211

iter 10 value 9194.608309

iter 20 value 9142.608309

iter 30 value 9128.737991

iter 40 value 9093.899887
.
.
.
iter 420 value 8077.803755

final value 8077.800112
converged
Error in nnet:multinom(frmla, data = training_set, maxit = 1000, :
NA/NaN argument

In addition: Warning message:

In nnet:multinom(frmla, data= training_set, maxit = 1000, :
numerical expression has 26 elements: only the first used

So that's my issue. I can't figure out the meaning behind both the  
error message and the warning message above. There are no NA values in  
my data set. I've also tried reducing the number of predictor  
variables, but I get the same issue (just a different number of  
iterations).

Thanks in advance.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with random numbers/seed

Rolf Turner
In reply to this post by Steven Yen

On 22/06/19 5:21 AM, Steven Yen wrote:

> Unhappy but thanks.
> Steven

Well, if you're *really* unhappy (???) you could always do

     suppressWarnings(RNGversion("3.5.3"))

Does that make you happier?

cheers,

Rolf

>
> On 6/22/2019 1:13 AM, Uwe Ligges wrote:
>>
>>
>> On 21.06.2019 19:09, Steven Yen wrote:
>>> Now I see that results were replicated but running RNGversion
>>> I get a warning message. Isn't there a way to do this clean?
>>
>> Well, the old RNG is known to be not optimal, hence we give a warning
>> if you choose the old one. This is the clean way if you really want to
>> get the old (slightly buggy) behaviour.
>>
>> Best,
>> Uwe Ligges
>>
>>>
>>>> RNGversion("3.5.3") Warning message: In RNGkind("Mersenne-Twister",
>>> "Inversion", "Rounding") : non-uniform 'Rounding' sampler used
>>>
>>>
>>> On 6/22/2019 1:03 AM, Uwe Ligges wrote:
>>>> What does not work?
>>>>
>>>>
>>>> For me it works under R-3.6.0:
>>>>
>>>>    x<-1:500
>>>>    set.seed(12345671)
>>>>    j<-sample(1:length(x),size=60); y<-x[j]
>>>>    summary(j)
>>>>
>>>>    RNGversion("3.5.3")
>>>>    set.seed(12345671)
>>>>    j<-sample(1:length(x),size=60); y<-x[j]
>>>>    summary(j)
>>>>
>>>>
>>>> Now I get the results you got udner the old R.
>>>>
>>>> Best,
>>>> Uwe Ligges
>>>>
>>>>
>>>>
>>>> On 21.06.2019 18:39, Steven Yen wrote:
>>>>> Thanks. Somewhat of a mystery. The older version I had was
>>>>> R-3.5.3patched.
>>>>> I cannot get the RNGversion command to run. Can you help? Thanks.
>>>>>
>>>>> On 6/22/2019 12:25 AM, Uwe Ligges wrote:
>>>>>> See the NEWS, the RNG has been changed, use RNGversion
>>>>>>
>>>>>> On 21.06.2019 18:10, Steven Yen wrote:
>>>>>>> Dear all,
>>>>>>> I did all this work with older R (R-3.5.3.patched and older)
>>>>>>> but now with R3.6 I cannot replicate the results.
>>>>>>> Below I sample 60 observations from 1:500 using the sample command
>>>>>>> with
>>>>>>> a random seed of 123. I get different results. Advice appreciated.
>>>>>>> Steven Yen
>>>>>>>
>>>>>>>     > # Run under R-3.6.0
>>>>>>>     > x<-1:500
>>>>>>>     > set.seed(12345671)
>>>>>>>     > j<-sample(1:length(x),size=60); y<-x[j]
>>>>>>>     > summary(y)
>>>>>>>        Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
>>>>>>>        26.0   134.2   240.0   249.8   368.0   500.0
>>>>>>>
>>>>>>>     > # Run under R-3.5.3.patched
>>>>>>>     > x<-1:500
>>>>>>>     > set.seed(12345671)
>>>>>>>     > j<-sample(1:length(x),size=60); y<-x[j]
>>>>>>>     > summary(y)
>>>>>>>        Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
>>>>>>>         9.0   122.2   205.0   236.1   364.2   493.0
>>>>>>>
>>>>>>
>>>>>>
>>>>>> Under R-3.6.0  use, e.g.
>>>>>> RNGversion("3.5.2")
>>>>>> to get reproducible results from the older RNG.
>>>>>>
>>>>>> Best,
>>>>>> Uwe Ligges
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> [hidden email]  (S.T. Yen)
>>>>>
>>>>
>>>
>>
>

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Problem witth nnet:multinom

David Winsemius
In reply to this post by Al Koholic

> On Jun 21, 2019, at 10:58 AM, Tom Woolman <[hidden email]> wrote:
>
> I am using R with the nnet package to perform a multinomial logistic regression on a training dataset with ~5800 training dataset records and 45 predictor variables in that training data. Predictor variables were chosen as a subset of all ~120 available variables based on PCA analysis. My target variable is a factor with 10 items.
> All predictor variable are numeric (type "dbl").
>
> My command in R is as follows:
>
> model <- nnet:multinom(frmla, data = training_set, maxit = 1000, na.action = na.omit)
>
> #note that the frmla string is a value of "Target_Variable ~ v1 + v2 + v3, etc."

Surely that is not its value. You should show the code that created the frmla object.

--
David.

> Output of this command is as follows (I will truncate to save a little space after the first few rows):
>
> # weights: 360 (308 variable)
> initial value 10912.909211
>
> iter 10 value 9194.608309
>
> iter 20 value 9142.608309
>
> iter 30 value 9128.737991
>
> iter 40 value 9093.899887
> .
> .
> .
> iter 420 value 8077.803755
>
> final value 8077.800112
> converged
> Error in nnet:multinom(frmla, data = training_set, maxit = 1000, :
> NA/NaN argument
>
> In addition: Warning message:
>
> In nnet:multinom(frmla, data= training_set, maxit = 1000, :
> numerical expression has 26 elements: only the first used
>
> So that's my issue. I can't figure out the meaning behind both the error message and the warning message above. There are no NA values in my data set. I've also tried reducing the number of predictor variables, but I get the same issue (just a different number of iterations).
>
> Thanks in advance.
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/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

'Any technology distinguishable from magic is insufficiently advanced.'   -Gehm's Corollary to Clarke's Third Law

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Plotting in R

Steven Yen-2
In reply to this post by Steven Yen-2
I have a data frame containing two variables: year and rate (shown below).
Which function can I use to plot rate (y-axis) against year (x-axis)?
There will be more columns of rate later on.
Thank you.

year rate 1 1993 0.608 2 1994 0.622 3 1996 0.623 4 1998 0.647 5 2000
0.646 6 2002 0.625 7 2004 0.628 8 2006 0.685 9 2008 0.679 10 2010 0.595
11 2012 0.567 12 2014 0.599 13 2016 0.642 14 2018 0.685



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Plotting in R

Steven Yen
In reply to this post by Steven Yen-2
I have a data frame containing two variables: year and rate (shown below).
Which function can I use to plot rate (y-axis) against year (x-axis)?
There will be more columns of rate later on.
Thank you.

year rate 1 1993 0.608 2 1994 0.622 3 1996 0.623 4 1998 0.647 5 2000
0.646 6 2002 0.625 7 2004 0.628 8 2006 0.685 9 2008 0.679 10 2010 0.595
11 2012 0.567 12 2014 0.599 13 2016 0.642 14 2018 0.685


--
[hidden email] (S.T. Yen)



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Plotting in R

Bert Gunter-2
Oh come on!

Please do your homework and spend time with some basic R tutorials, one of
which ships with R, although there are tons more good ones on the web.

And FYI, there are *several* different plotting systems that one can access
using various R packages. Probably the most basic -- but still quite
powerful -- uses the function ?plot  !!


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, Jul 6, 2019 at 6:33 AM Steven Yen <[hidden email]> wrote:

> I have a data frame containing two variables: year and rate (shown below).
> Which function can I use to plot rate (y-axis) against year (x-axis)?
> There will be more columns of rate later on.
> Thank you.
>
> year rate 1 1993 0.608 2 1994 0.622 3 1996 0.623 4 1998 0.647 5 2000
> 0.646 6 2002 0.625 7 2004 0.628 8 2006 0.685 9 2008 0.679 10 2010 0.595
> 11 2012 0.567 12 2014 0.599 13 2016 0.642 14 2018 0.685
>
>
> --
> [hidden email] (S.T. Yen)
>
>
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Plotting in R

Rui Barradas
In reply to this post by Steven Yen
Hello,

Please don't post inHTML, the data is unreadable.

As for the question, it is very basic. try any of


plot(rate ~ year, data = df)    # df is your dataframe
plot(df$year, df$rate)


Then read ?plot and ?par to see how to customize the graph, by  
changing the plot type, how to add colors, etc.

Hope this helps,

Rui Barradas



Citando Steven Yen <[hidden email]>:

> I have a data frame containing two variables: year and rate (shown below).
> Which function can I use to plot rate (y-axis) against year (x-axis)?
> There will be more columns of rate later on.
> Thank you.
>
> year rate 1 1993 0.608 2 1994 0.622 3 1996 0.623 4 1998 0.647 5 2000
> 0.646 6 2002 0.625 7 2004 0.628 8 2006 0.685 9 2008 0.679 10 2010 0.595
> 11 2012 0.567 12 2014 0.599 13 2016 0.642 14 2018 0.685
>
>
> --
> [hidden email] (S.T. Yen)
>
>
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Plotting in R

John Kane-3
Please do not post in html.

You could use ggplot to do this. But you need to do a bit of work yourself.

On Sat, 6 Jul 2019 at 10:51, <[hidden email]> wrote:

>
> Hello,
>
> Please don't post inHTML, the data is unreadable.
>
> As for the question, it is very basic. try any of
>
>
> plot(rate ~ year, data = df)    # df is your dataframe
> plot(df$year, df$rate)
>
>
> Then read ?plot and ?par to see how to customize the graph, by
> changing the plot type, how to add colors, etc.
>
> Hope this helps,
>
> Rui Barradas
>
>
>
> Citando Steven Yen <[hidden email]>:
>
> > I have a data frame containing two variables: year and rate (shown below).
> > Which function can I use to plot rate (y-axis) against year (x-axis)?
> > There will be more columns of rate later on.
> > Thank you.
> >
> > year rate 1 1993 0.608 2 1994 0.622 3 1996 0.623 4 1998 0.647 5 2000
> > 0.646 6 2002 0.625 7 2004 0.628 8 2006 0.685 9 2008 0.679 10 2010 0.595
> > 11 2012 0.567 12 2014 0.599 13 2016 0.642 14 2018 0.685
> >
> >
> > --
> > [hidden email] (S.T. Yen)
> >
> >
> >
> > ---
> > This email has been checked for viruses by Avast antivirus software.
> > https://www.avast.com/antivirus
> >
> >       [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/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

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
12