Re: [R] what can we do when R gives no response

From: jim holtman <jholtman_at_gmail.com>
Date: Thu, 03 Jul 2008 08:07:06 -0400

> sessionInfo()

R version 2.7.1 (2008-06-23)
i386-pc-mingw32

locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United
States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252

attached base packages:
[1] stats grDevices utils datasets graphics methods base
> x <- rnbinom(100, mu = 10, size = 10)
> hdev <- function(par) {
+ -sum(dnbinom(x, mu = par[1], size = par[2], log = TRUE)) + }
> nlminb(c(9, 12), hdev)

$par
[1] 9.50000 7.33456

$objective
[1] 291.1192

$convergence
[1] 0

$message
[1] "relative convergence (4)"

$iterations
[1] 10

$evaluations
function gradient

      12 27

2008/7/3 Peng Jiang <jp021_at_sjtu.edu.cn>:
> Hi, Jim
> thanks for your reply, I tried the scripts it still does not give any
> response on my mac. I have to stop in manually.
> what is your sessionInfo ? Thanks again.
> On 2008-7-3, at 上午10:10, jim holtman wrote:
>
>> I ran you script and it came back in less than 1 second:
>>
>>> x <- rnbinom(100, mu = 10, size = 10)
>>> hdev <- function(par) {
>>
>> + -sum(dnbinom(x, mu = par[1], size = par[2], log = TRUE))
>> + }
>>>
>>> nlminb(c(9, 12), hdev)
>>
>> $par
>> [1] 9.760001 13.802305
>>
>> $objective
>> [1] 278.9434
>>
>> $convergence
>> [1] 0
>>
>> $message
>> [1] "relative convergence (4)"
>>
>> $iterations
>> [1] 11
>>
>> $evaluations
>> function gradient
>> 12 31
>>
>>>
>>
>>
>>
>> On Wed, Jul 2, 2008 at 8:41 PM, Peng Jiang <jp021_at_sjtu.edu.cn> wrote:
>>>
>>> Hi, dear R experts ,
>>> I am new. I met this problem when I am trying to learn how to use
>>> the nlminb() function. I tried the example which the document
>>> provides ( as the following code ) and R gives no response . I don't
>>> know whether it is running or not and it takes a very long time but
>>> still output nothing so I just close the session window. my question
>>> is is there any method that I can see the running status of a R
>>> program or what can I do if R gives no response??? thank you in advance.
>>> here is my sessionInfo
>>>
>>> i386-apple-darwin8.10.1
>>>
>>> locale:
>>> zh_CN.UTF-8/zh_CN.UTF-8/C/C/zh_CN.UTF-8/zh_CN.UTF-8
>>>
>>> attached base packages:
>>> [1] stats graphics grDevices utils datasets methods base
>>>
>>> other attached packages:
>>> [1] mclust_3.1-5
>>> x <- rnbinom(100, mu = 10, size = 10)
>>> hdev <- function(par) {
>>> -sum(dnbinom(x, mu = par[1], size = par[2], log = TRUE))
>>> }
>>> nlminb(c(9, 12), hdev)
>>> -----------------------------------------------
>>> Peng Jiang 江鹏 ,Ph.D. Candidate
>>> Antai College of Economics & Management
>>> 安泰经济管理学院
>>> Department of Mathematics
>>> 数学系
>>> Shanghai Jiaotong University (Minhang Campus)
>>> 800 Dongchuan Road
>>> 200240 Shanghai
>>> P. R. China
>>>
>>>
>>> [[alternative HTML version deleted]]
>>>
>>>
>>> ______________________________________________
>>> R-help_at_r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide
>>> http://www.R-project.org/posting-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
>>>
>>>
>>
>>
>>
>> --
>> Jim Holtman
>> Cincinnati, OH
>> +1 513 646 9390
>>
>> What is the problem you are trying to solve?
>
> -----------------------------------------------
> Peng Jiang 江鹏 ,Ph.D. Candidate
> Antai College of Economics & Management
> 安泰经济管理学院
> Department of Mathematics
> 数学系
> Shanghai Jiaotong University (Minhang Campus)
> 800 Dongchuan Road
> 200240 Shanghai
> P. R. China
>
>

-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem you are trying to solve?
______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Thu 03 Jul 2008 - 12:15:08 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 03 Jul 2008 - 12:31:53 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive