Re: [Rcom-l] A question or a bug about x<-c(TRUE,FALSE,NA)

2008-10-12 Thread Thomas Baier
Hi Qiaohj,

[EMAIL PROTECTED] schrieb:
> and there is another good news. My first child was born three days ago.

congratulations and welcome to our rcom family :)

Thomas

___
Rcom-l mailing list
Rcom-l@mailman.csd.univie.ac.at
http://mailman.csd.univie.ac.at/mailman/listinfo/rcom-l
More information (including a Wiki) at http://rcom.univie.ac.at


Re: [Rcom-l] A question or a bug about x<-c(TRUE,FALSE,NA)

2008-10-12 Thread qiaohj
Hi Thomas,

excellent, it's a good news for me.

and there is another good news. My first child was born three days ago.

Qiaohj



> Hi,
>
> Qiao Hui-jie schrieb:
>> I know the meaning of "error 2042 "&" -2146826246" is "NA".
>>
>> What  confused me is if i execute the command " x<-c(TRUE,FALSE,NA)",
>> the
>> first returned value is "FALSE" but not "TRUE" in both VB6.0 and C#3.5
>>
>> this is the test code
>>
>> Set r = CreateObject("StatConnectorSrv.StatConnector")
>>   r.init "R"
>>   r.Evaluate("x<-c(TRUE,FALSE,NA)")
>>
>> if i track  r.Evaluate("x<-c(TRUE,FALSE,NA)") in "Watches " windows, i
>> will
>> see the error returned values(in the hyperlink below)
>>
>> http://www.ioz.ac.cn/temp/error.jpg
>
> the bug should now be fixed. It applies to both integer and logical
> vectors containing NA values.
>
> Please update rscproxy and rcom from CRAN.
>
> A fix for (D)COM-Server will be available soon.
>
> Thomas
> ___
> Rcom-l mailing list
> Rcom-l@mailman.csd.univie.ac.at
> http://mailman.csd.univie.ac.at/mailman/listinfo/rcom-l
> More information (including a Wiki) at http://rcom.univie.ac.at
>

___
Rcom-l mailing list
Rcom-l@mailman.csd.univie.ac.at
http://mailman.csd.univie.ac.at/mailman/listinfo/rcom-l
More information (including a Wiki) at http://rcom.univie.ac.at


Re: [Rcom-l] A question or a bug about x<-c(TRUE,FALSE,NA)

2008-10-12 Thread Thomas Baier

Hi,

Qiao Hui-jie schrieb:

I know the meaning of "error 2042 "&" -2146826246" is "NA".

What  confused me is if i execute the command " x<-c(TRUE,FALSE,NA)", the
first returned value is "FALSE" but not "TRUE" in both VB6.0 and C#3.5

this is the test code

Set r = CreateObject("StatConnectorSrv.StatConnector")
  r.init "R"
  r.Evaluate("x<-c(TRUE,FALSE,NA)")

if i track  r.Evaluate("x<-c(TRUE,FALSE,NA)") in "Watches " windows, i will
see the error returned values(in the hyperlink below)

http://www.ioz.ac.cn/temp/error.jpg


the bug should now be fixed. It applies to both integer and logical 
vectors containing NA values.


Please update rscproxy and rcom from CRAN.

A fix for (D)COM-Server will be available soon.

Thomas
___
Rcom-l mailing list
Rcom-l@mailman.csd.univie.ac.at
http://mailman.csd.univie.ac.at/mailman/listinfo/rcom-l
More information (including a Wiki) at http://rcom.univie.ac.at


Re: [Rcom-l] A question or a bug about x<-c(TRUE,FALSE,NA)

2008-10-09 Thread Thomas Baier

Hi,


Thanks for your patience. I apologize for my shabby English.

I have another question.

1. I execute x<-c(NA,NA) through the funtion of "EvaluateNoReturn". 
2. Evaluate("x")

the application can return the right value whose type is "object[]", and
mode(x)="logical"

but if i execute x<-c(NA), and Evaluate("x"), the application will throw an
exception. but the mode(x)="logical", too.

the error is similar as
Evaluate("data.frame(name=c("tom","jack"),age=c(20,21))")

as i know that Evaluate cannot return a complex data structure like
"data.frame", 


but in my opinion, x<-c(NA), x just a simple data type.


please try to find out the return value of Evaluate() (the real one, the 
COM HRESULT, not the data, which in reality is just another parameter 
filled in by Evaluate).


Thomas

___
Rcom-l mailing list
Rcom-l@mailman.csd.univie.ac.at
http://mailman.csd.univie.ac.at/mailman/listinfo/rcom-l
More information (including a Wiki) at http://rcom.univie.ac.at


RE: [Rcom-l] A question or a bug about x<-c(TRUE,FALSE,NA)

2008-10-09 Thread Qiao Hui-jie
 
Dear Thomas:

Thanks for your patience. I apologize for my shabby English.

I have another question.

1. I execute x<-c(NA,NA) through the funtion of "EvaluateNoReturn". 
2. Evaluate("x")
the application can return the right value whose type is "object[]", and
mode(x)="logical"

but if i execute x<-c(NA), and Evaluate("x"), the application will throw an
exception. but the mode(x)="logical", too.

the error is similar as
Evaluate("data.frame(name=c("tom","jack"),age=c(20,21))")

as i know that Evaluate cannot return a complex data structure like
"data.frame", 

but in my opinion, x<-c(NA), x just a simple data type.

do you have any idea about it?

Thank for your help, thank again.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Thomas Baier
Sent: Thursday, October 09, 2008 12:21 PM
To: R (D)COM and RExcel server related issues
Subject: Re: [Rcom-l] A question or a bug about x<-c(TRUE,FALSE,NA)

Qiao Hui-jie schrieb:
> I know the meaning of "error 2042 "&" -2146826246" is "NA".
> 
> What  confused me is if i execute the command " x<-c(TRUE,FALSE,NA)", 
> the first returned value is "FALSE" but not "TRUE" in both VB6.0 and 
> C#3.5
> 
> this is the test code

Sorry, I just answered too early (or better: I did not read your post
carefully enough :). Maybe there is a problem with NA values and data
transfer. I'll have to investigate.

Unfortunately this sounds like being a problem in rproxy, where there
currently is an issue for R 2.8.0, where I'm still searching for a solution.

Thomas

___
Rcom-l mailing list
Rcom-l@mailman.csd.univie.ac.at
http://mailman.csd.univie.ac.at/mailman/listinfo/rcom-l
More information (including a Wiki) at http://rcom.univie.ac.at


___
Rcom-l mailing list
Rcom-l@mailman.csd.univie.ac.at
http://mailman.csd.univie.ac.at/mailman/listinfo/rcom-l
More information (including a Wiki) at http://rcom.univie.ac.at


Re: [Rcom-l] A question or a bug about x<-c(TRUE,FALSE,NA)

2008-10-08 Thread Thomas Baier

Qiao Hui-jie schrieb:

I know the meaning of "error 2042 "&" -2146826246" is "NA".

What  confused me is if i execute the command " x<-c(TRUE,FALSE,NA)", the
first returned value is "FALSE" but not "TRUE" in both VB6.0 and C#3.5

this is the test code


Sorry, I just answered too early (or better: I did not read your post 
carefully enough :). Maybe there is a problem with NA values and data 
transfer. I'll have to investigate.


Unfortunately this sounds like being a problem in rproxy, where there 
currently is an issue for R 2.8.0, where I'm still searching for a solution.


Thomas

___
Rcom-l mailing list
Rcom-l@mailman.csd.univie.ac.at
http://mailman.csd.univie.ac.at/mailman/listinfo/rcom-l
More information (including a Wiki) at http://rcom.univie.ac.at


RE: [Rcom-l] A question or a bug about x<-c(TRUE,FALSE,NA)

2008-10-08 Thread Qiao Hui-jie
Dear Thomas,

I know the meaning of "error 2042 "&" -2146826246" is "NA".

What  confused me is if i execute the command " x<-c(TRUE,FALSE,NA)", the
first returned value is "FALSE" but not "TRUE" in both VB6.0 and C#3.5

this is the test code

Set r = CreateObject("StatConnectorSrv.StatConnector")
  r.init "R"
  r.Evaluate("x<-c(TRUE,FALSE,NA)")

if i track  r.Evaluate("x<-c(TRUE,FALSE,NA)") in "Watches " windows, i will
see the error returned values(in the hyperlink below)

http://www.ioz.ac.cn/temp/error.jpg


 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Thomas Baier
Sent: Thursday, October 09, 2008 1:02 AM
To: R (D)COM and RExcel server related issues
Subject: Re: [Rcom-l] A question or a bug about x<-c(TRUE,FALSE,NA)

Qiao Hui-jie schrieb:
> in R, I type in this command x<-c(TRUE,FALSE,NA) then it returns the 
> correct response "TRUE,FALSE,NA"
> 
> When i use it in both VB6.0 and C#, the function Evaluate() will 
> return an array of object, and the values in it is 
> "false","false","error 2042(in vb) / -2146826246(in c#) ", the first value
is wrong.
> 
> But if i Evaluate("x is right?
> 
> how can i deal with this condition?

error 2042 is NA. Speaking in COM terms, the VARIANT type is VT_ERROR, the
value is 2042. This is what some apps, e.g., Excel, will send for NA values.

Thomas

___
Rcom-l mailing list
Rcom-l@mailman.csd.univie.ac.at
http://mailman.csd.univie.ac.at/mailman/listinfo/rcom-l
More information (including a Wiki) at http://rcom.univie.ac.at


___
Rcom-l mailing list
Rcom-l@mailman.csd.univie.ac.at
http://mailman.csd.univie.ac.at/mailman/listinfo/rcom-l
More information (including a Wiki) at http://rcom.univie.ac.at


Re: [Rcom-l] A question or a bug about x<-c(TRUE,FALSE,NA)

2008-10-08 Thread Thomas Baier

Qiao Hui-jie schrieb:

in R, I type in this command x<-c(TRUE,FALSE,NA) then it returns the correct
response "TRUE,FALSE,NA"

When i use it in both VB6.0 and C#, the function Evaluate() will return an
array of object, and the values in it is "false","false","error 2042(in vb)
/ -2146826246(in c#) ", the first value is wrong.

But if i Evaluate("x

error 2042 is NA. Speaking in COM terms, the VARIANT type is VT_ERROR, 
the value is 2042. This is what some apps, e.g., Excel, will send for NA 
values.


Thomas

___
Rcom-l mailing list
Rcom-l@mailman.csd.univie.ac.at
http://mailman.csd.univie.ac.at/mailman/listinfo/rcom-l
More information (including a Wiki) at http://rcom.univie.ac.at