如何使用//$encodedData = json_encode($json);//double-encoded code issue here!
$encodedData = $json;
curl_setopt($curl_handle, CURLOPT_POSTFIELDS, $encodedData);
$request_headers[] = 'Content-Length: '.strlen($encodedData);
包进行以下操作?
purrr
答案 0 :(得分:3)
您可以在A[k]
包中尝试array_branch
or array_tree
,它会将多维数组强制转换为展平列表或层次结构列表:
purrr
获得与# array_tree
map(array_tree(test, c(1, 2)), ~ map_int(., which.min))
# [[1]]
# [1] 1 1 4 7 10
#
# [[2]]
# [1] 8 2 1 3 8
# array_branch
map_int(array_branch(test, margin = c(1, 2)), which.min)
# [1] 1 8 1 2 4 1 7 3 10 8
相同的结果:
apply