RTypeProvider
은 같은 유형의 namedParams
만 처리 할 수 있습니다. 이 경우인가요? 예를 들어RTypeProvider를 사용하여 여러 유형의 데이터 프레임을 만드는 방법
, 나는 thingForR
하자의 순서를 반대로하면 내가
This expression was expected to have type
string
but here has type
float option
을 말하는 x.Qty
에 오류가로
open RDotNet
open RProvider
type foo = {
Which: string
Qty: float option
}
let someFoos = [{Which = "that"; Qty = Some 4.0}; {Which = "other"; Qty = Some 2.0}]
let thingForR =
namedParams [
"which", someFoos |> List.map (fun x -> x.Which);
"qty", someFoos |> List.map (fun x -> x.Qty);
]
|> R.data_frame
이 작동하지 않습니다, 나는 반대 오류 :
let thingForR =
namedParams [
"qty", someFoos |> List.map (fun x -> x.Qty);
"which", someFoos |> List.map (fun x -> x.Which);
]
|> R.data_frame
여기에서의 오류은
This expression was expected to have type
float option
but here has type
string
namedParams
의 사전에는 다른 유형이 없을 수 있습니까? 그렇다면 F #에서 다른 유형의 데이터 프레임을 만들고이를 R로 전달하는 방법은 무엇입니까?
강하게 언어 입력에 오신 것을 환영합니다. 그러나 옵션 유형에도 문제가 있습니다. 왜 그런지 모르지만 변환기가 없습니다. 먼저 관련 답변을 검색하겠습니다. – s952163