Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing array of lenght 1 to .NET #108

Open
PavelBal opened this issue Mar 12, 2024 · 1 comment
Open

Passing array of lenght 1 to .NET #108

PavelBal opened this issue Mar 12, 2024 · 1 comment

Comments

@PavelBal
Copy link
Member

Currently not supported as R always converts an array of length 1 to a scalar.

test_that("Basic types of length one are passed correctly from R to .NET", {
  expectArrayElementType(numeric(1), "System.Double")
  expectArrayElementType(integer(1), "System.Int32")
  expectArrayElementType(raw(1), "System.Byte")
  expectArrayElementType(logical(1), "System.Boolean")
  expectArrayElementType(character(1), "System.String")
  expectArrayElementType("a", "System.String")
})
Error in do.call(".External", c(list("r_call_static_method", typename,  : 
  Type:    System.MissingMethodException
Message: Could not find a suitable static method CheckElementType on type ClrFacade.TestArrayMemoryHandling for method parameters Double, RuntimeType
Method:  Void ThrowMissingMethod(System.Type, System.String, System.String, System.Type[])
Stack trace:
   at ClrFacade.ReflectionHelper.ThrowMissingMethod(Type classType, String methodName, String modifier, Type[] types) in D:\Work\OSPS\Repos\rSharp\shared\ClrFacade\ReflectionHelper.cs:line 790
   at ClrFacade.Internal.InternalCallStaticMethod(Type classType, String methodName, Boolean tryUseConverter, Object[] arguments) in D:\Work\OSPS\Repos\rSharp\shared\ClrFacade\Internal.cs:line 98
   at ClrFacade.Internal.CallStaticMethod(String typename, String methodName, Object[] objects) in D:\Work\OSPS\Repos\rSharp\shared\ClrFacade\Internal.cs:line 105
   at ClrFacade.Internal.CallStaticMethod(String typename, String methodName, IntPtr arguments, Int32 numObjects, IntPtr returnValue) in D:\Work\O
@PavelBal
Copy link
Member Author

# https://github.com/Open-Systems-Pharmacology/rSharp/issues/108

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant