官术网_书友最值得收藏!

sapply

What we have got by using unlist(lapply(data, function, arguments_of_the_function)) can be obtained simply by using sapply(data, function, arguments_of_the_function).

sapply(all_prices4$june_price, power_function2, 4)

We are returned with a vector again as follows:

Now let's go back to the example of the all_prices3 data frame. We can see this from the screenshot that follows:

主站蜘蛛池模板: 江达县| 沙河市| 健康| 方城县| 乌什县| 加查县| 双柏县| 沙湾县| 雅安市| 永兴县| 淮南市| 宁晋县| 察隅县| 威海市| 长岭县| 镇康县| 临湘市| 南安市| 镇沅| 黎平县| 安岳县| 乌兰浩特市| 嘉义县| 涡阳县| 尼勒克县| 大荔县| 梁山县| 铁岭市| 延川县| 大余县| 烟台市| 澳门| 如东县| 城市| 南川市| 固安县| 慈溪市| 甘谷县| 磐石市| 长寿区| 彰化县|