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
Currently not supported as R always converts an array of length 1 to a scalar.