router求推荐# PDA - 掌中宝
l*9
1 楼
【 以下文字转载自 Statistics 讨论区 】
发信人: light009 (light009), 信区: Statistics
标 题: a hash embedded with another hash in R
发信站: BBS 未名空间站 (Fri Apr 11 15:56:40 2014, 美东)
This question is related to my previous question.
I need to design a hash that is embedded with another hash in R in Rstudio
on Win 7.
library(hash)
myf {
h1 if (!has.key("first", h1))
{
list1 h1.sonh1.son["first_son"] h1["first"] }
# second check
if(!has.key("first_son", h1["first"]))
{
list1 h1.sonh1.son["first_son"] h1["first"] }
}
myf()
Why in "second check ", h1["first"] still has NO key of "first_son", which
has been added before.
Thanks !
发信人: light009 (light009), 信区: Statistics
标 题: a hash embedded with another hash in R
发信站: BBS 未名空间站 (Fri Apr 11 15:56:40 2014, 美东)
This question is related to my previous question.
I need to design a hash that is embedded with another hash in R in Rstudio
on Win 7.
library(hash)
myf {
h1 if (!has.key("first", h1))
{
list1 h1.sonh1.son["first_son"] h1["first"] }
# second check
if(!has.key("first_son", h1["first"]))
{
list1 h1.sonh1.son["first_son"] h1["first"] }
}
myf()
Why in "second check ", h1["first"] still has NO key of "first_son", which
has been added before.
Thanks !