Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用RCocoa在R中加载objective-c库_Objective C_R - Fatal编程技术网

使用RCocoa在R中加载objective-c库

使用RCocoa在R中加载objective-c库,objective-c,r,Objective C,R,我在找到了R包Cocoa,我想用它来调用我定制的objective-c类 我尝试加载一个动态库,其中包含一个简单的自定义类(称为DOHello,如下所示),然后调用: hc <- .MClass("DOHello") h <- .M(hc, "alloc") h <- .M(h, "init") .M(h, "hello") 事故报告: Process: rsession [8215] Path: /Applications/RStudi

我在找到了R包Cocoa,我想用它来调用我定制的objective-c类

我尝试加载一个动态库,其中包含一个简单的自定义类(称为
DOHello
,如下所示),然后调用:

hc <- .MClass("DOHello")
h <- .M(hc, "alloc")
h <- .M(h, "init")
.M(h, "hello")
事故报告:

Process:         rsession [8215]
Path:            /Applications/RStudio.app/Contents/MacOS/rsession
Identifier:      rsession
Version:         ???
Code Type:       X86-64 (Native)
Parent Process:  RStudio [1931]
User ID:         502

Date/Time:       2013-03-04 11:47:44.858 +0800
OS Version:      Mac OS X 10.8.2 (12C54)
Report Version:  10

Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.CoreFoundation        0x00007fff867d301d __NSI0 + 621
1   com.apple.CoreFoundation        0x00007fff867d2aee -[NSInvocation getArgument:atIndex:] + 302
2   Cocoa.so                        0x000000010c4fef4f ObjCsendMsg + 1135
3   libR.dylib                      0x0000000109ffee37 do_External + 327 (dotcode.c:540)
4   libR.dylib                      0x000000010a02e448 Rf_eval + 1672 (eval.c:494)
5   libR.dylib                      0x000000010a02fedd do_begin + 141 (eval.c:1415)
6   libR.dylib                      0x000000010a02e29c Rf_eval + 1244 (eval.c:468)
7   libR.dylib                      0x000000010a0333b1 Rf_applyClosure + 849 (eval.c:861)
8   libR.dylib                      0x000000010a02e1b2 Rf_eval + 1010 (eval.c:512)
9   libR.dylib                      0x000000010a0669e2 Rf_ReplIteration + 514 (main.c:256)
10  libR.dylib                      0x000000010a066cd1 R_ReplConsole + 161 (main.c:306)
11  libR.dylib                      0x000000010a0671ea run_Rmainloop + 90 (main.c:988)
12  rsession                        0x0000000109786b1b r::session::runEmbeddedR(core::FilePath const&, core::FilePath const&, bool, bool, SA_TYPE, r::session::Callbacks const&, r::session::InternalCallbacks*) + 427
13  rsession                        0x0000000109769b29 r::session::run(r::session::ROptions const&, r::session::RCallbacks const&) + 3193
14  rsession                        0x0000000109386f35 main + 14517
15  rsession                        0x000000010936e154 start + 52

崩溃报告不完整,我只是复制了我认为有用的部分。

这是
Cocoa
中的一个错误,它试图从一个void方法检索结果,现在已修复。请使用stats rosuda-devel邮件列表或通过电子邮件向作者询问问题和错误报告

Process:         rsession [8215]
Path:            /Applications/RStudio.app/Contents/MacOS/rsession
Identifier:      rsession
Version:         ???
Code Type:       X86-64 (Native)
Parent Process:  RStudio [1931]
User ID:         502

Date/Time:       2013-03-04 11:47:44.858 +0800
OS Version:      Mac OS X 10.8.2 (12C54)
Report Version:  10

Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.CoreFoundation        0x00007fff867d301d __NSI0 + 621
1   com.apple.CoreFoundation        0x00007fff867d2aee -[NSInvocation getArgument:atIndex:] + 302
2   Cocoa.so                        0x000000010c4fef4f ObjCsendMsg + 1135
3   libR.dylib                      0x0000000109ffee37 do_External + 327 (dotcode.c:540)
4   libR.dylib                      0x000000010a02e448 Rf_eval + 1672 (eval.c:494)
5   libR.dylib                      0x000000010a02fedd do_begin + 141 (eval.c:1415)
6   libR.dylib                      0x000000010a02e29c Rf_eval + 1244 (eval.c:468)
7   libR.dylib                      0x000000010a0333b1 Rf_applyClosure + 849 (eval.c:861)
8   libR.dylib                      0x000000010a02e1b2 Rf_eval + 1010 (eval.c:512)
9   libR.dylib                      0x000000010a0669e2 Rf_ReplIteration + 514 (main.c:256)
10  libR.dylib                      0x000000010a066cd1 R_ReplConsole + 161 (main.c:306)
11  libR.dylib                      0x000000010a0671ea run_Rmainloop + 90 (main.c:988)
12  rsession                        0x0000000109786b1b r::session::runEmbeddedR(core::FilePath const&, core::FilePath const&, bool, bool, SA_TYPE, r::session::Callbacks const&, r::session::InternalCallbacks*) + 427
13  rsession                        0x0000000109769b29 r::session::run(r::session::ROptions const&, r::session::RCallbacks const&) + 3193
14  rsession                        0x0000000109386f35 main + 14517
15  rsession                        0x000000010936e154 start + 52