由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Quant版 - a hash embedded with another hash in R (转载)
相关主题
database startup の 广告~ (不是骗子) (转载)NPV + embedded option
一个 quant positionMBS hedging
学Matlab还是R?oas高好还是低好
做并行计算 using R in databricks spark【Stats】问个经典概率题
[合集] another interview question[合集] 谁能推荐些金融休闲书?
[合集] AC21 to switch a job from embedded software engineer to a d[合集] PROPRIETARY EQUITY TRADER
[合集] find a missing value(c++)[合集] second phone interview after 6 months from GS
Another interview question请问谁有IMSL library 5.0版本的
相关话题的讨论汇总
话题: hash话题: first话题: list1话题: h1话题: embedded
进入Quant版参与讨论
1 (共1页)
l******9
发帖数: 579
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 <- function()
{
h1 <- hash()
if (!has.key("first", h1))
{
list1 <- list()
h1.son<- hash()
h1.son["first_son"] <- list1
h1["first"] <- h1.son
}
# second check
if(!has.key("first_son", h1["first"]))
{
list1 <- list()
h1.son<- hash()
h1.son["first_son"] <- list1
h1["first"] <- h1.son
}
}
myf()
Why in "second check ", h1["first"] still has NO key of "first_son", which
has been added before.
Thanks !
1 (共1页)
进入Quant版参与讨论
相关主题
请问谁有IMSL library 5.0版本的[合集] another interview question
请问有谁参加 Constellation energy Third Round interview?[合集] AC21 to switch a job from embedded software engineer to a d
哪里有电子版本的c++ faq lite下载?[合集] find a missing value(c++)
请问隐含波动率为0是什么意思?Another interview question
database startup の 广告~ (不是骗子) (转载)NPV + embedded option
一个 quant positionMBS hedging
学Matlab还是R?oas高好还是低好
做并行计算 using R in databricks spark【Stats】问个经典概率题
相关话题的讨论汇总
话题: hash话题: first话题: list1话题: h1话题: embedded