Wednesday, 17 December 2014

Tuesday, 16 December 2014

A Christmas R parcel: refset

I have a new R package on github, called refset. refset's tagline is "subsets with reference semantics". In English, that means: a refset is a subset which automatically stays in sync with its parent data. When you change the parent, the refset is updated, and when you change the refset, you are changing the parent.

The README has full details, but here's a brief taster:



Creating a refset

employees <- data.frame( 
      name=c("James", "Sylvia", "Meng Qi", "Luis"), 
      age=c(28,44,38, 23), 
      gender=factor(c("M", "F", "F", "M")), 
refset(rs, employees[1:2,])

Refsets refer to the original

##   id   name age gender
## 1  1  James  28      M
## 2  2 Sylvia  44      F 
employees$name[1] <- "Jimmy"
##   id   name age gender
## 1  1  Jimmy  28      M
## 2  2 Sylvia  44      F

Refsets change the original

rs$age <- c(29, 45)
## [1] 29 45 38 23
... continued on github. Enjoy!

Tuesday, 9 December 2014

Bits from the report on the CIA's enhanced interrogation techniques

Original document.

The waterboarding technique was physically harmful, inducing convulsions and vomiting. Abu Zubaydah, for example, became "completely unresponsive, with bubbles rising through his open, full mouth.'" Internal CIA records describe the waterboarding of Khalid Shaykh Mohammad as evolving into a "series of near drownings."

Sleep deprivation involved keeping detainees awake for up to 180 hours, usually standing or in stress positions, at times with their hands shackled above their heads. At least five detainees experienced disturbing hallucinations during prolonged sleep deprivation and, in at least two of those cases, the CIA nonetheless continued the sleep deprivation. Contrary to CIA representations to the Department of Justice, the CIA instructed personnel that the interrogation of Abu Zubaydah would take "precedence" over his medical care, resulting in the deterioration of a bullet wound Abu Zubaydah incurred during his capture....

At least five CIA detainees were subjected to "rectal rehydration" or rectal feeding without documented medical necessity. The CIA placed detainees in ice water "baths." The CIA led several detainees to believe they would never be allowed to leave CIA custody alive, suggesting to one detainee that he would only leave in a coffin-shaped box. One interrogator told another detainee that he would never go to court, because "we can never let the world know what I have done to you." CIA officers also threatened at least three detainees with harm to their families— to include threats to harm the children of a detainee, threats to sexually abuse the mother of a detainee, and a threat to "cut [a detainee's] mother's throat."


Conditions at CIA detention sites were poor, and were especially bleak early in the program. CIA detainees at the COBALT detention facility were kept in complete darkness and constantly shackled in isolated cells with loud noise or music and only a bucket to use for human waste. Lack of heat at the facility likely contributed to the death of a detainee. The chief of interrogations described COBALT as a "dungeon." Another senior CIA officer stated that COBALT was itself an enhanced interrogation technique."

At times, the detainees at COBALT were walked around naked or were shackled with their hands above their heads for extended periods of time. Other times, the detainees at COBALT were subjected to what was described as a "rough takedown," in which approximately five CIA officers would scream at a detainee, drag him outside of his cell, cut his clothes off, and secure him with Mylar tape. The detainee would then be hooded and dragged up and down a long corridor while being slapped and punched.

Even after the conditions of confinement improved with the construction of new detention facilities, detainees were held in total isolation except when being interrogated or debriefed by CIA personnel. Throughout the program, multiple CIA detainees who were subjected to the CIA's enhanced interrogation techniques and extended isolation exhibited psychological and behavioral issues, including hallucinations, paranoia, insomnia, and attempts at self-harm and self-mutilation. Multiple psychologists identified the lack of human contact experienced by detainees as a cause of psychiatric problems.


The CIA's COBALT detention facility in Country -- began operations in September 2002 and ultimately housed more than half of the 119 CIA detainees identified in this Study. The CIA kept few formal records of the detainees in its custody at COBALT. Untrained CIA officers at the facility conducted frequent, unauthorized, and unsupervised interrogations of detainees using harsh physical interrogation techniques that were not—and never became—part of the CIA's formal "enhanced" interrogation program. The CIA placed a junior officer with no relevant experience in charge of COBALT. On November --, 2002, a detainee who had been held partially nude and chained to a concrete floor died from suspected hypothermia at the facility.


The CIA contracted with two psychologists to develop, operate, and assess its interrogation operations....

On the CIA's behalf, the contract psychologists developed theories of interrogation based on "learned helplessness,"and developed the list of enhanced interrogation techniques that was approved for use against Abu Zubaydah and subsequent CIA detainees. The psychologists personally conducted interrogations of some of the CIA's most significant detainees using these techniques. They also evaluated whether detainees' psychological state allowed for the continued use of the CIA's enhanced interrogation techniques, including some detainees whom they were themselves interrogating or had interrogated. The psychologists carried out inherently governmental functions, such as acting as liaison between the CIA and foreign intelligence services, assessing the effectiveness of the interrogation program, and participating in the interrogation of detainees in held in foreign government custody.

In 2005, the psychologists formed a company specifically for the purpose of conducting their work with the CIA. Shortly thereafter, the CIA outsourced virtually all aspects of the program.

In 2006, the value of the CIA's base contract with the company formed by the psychologists with all options exercised was in excess of $180 million...


[Individuals detained by the CIA included]  Abu Hudhaifa, who was subjected to ice water baths and 66 hours of standing sleep deprivation before being released because the CIA discovered he was likely not the person he was believed to be ... Muhammad Khan, who, like Zarmein, was among detainees about whom the CIA acknowledged knowing "very little"... Haji Ghalgi, who was detained as "useful leverage" against a family member... Nazar Ali, an "intellectually challenged" individual whose taped crying was used as leverage against his family member...

a cable described Abu Zubaydah's cell as white with no natural lighting or windows, but with four halogen lights pointed into the cell." An air conditioner was also in the room. A white curtain separated the interrogation room from the cell. The interrogation cell had three padlocks. Abu Zubaydah was also provided with one of two chairs that were rotated based on his level of cooperation (one described as more comfortable tlian the other). Security officers wore all black uniforms, including boots, gloves, balaclavas, and goggles to keep Abu Zubaydah from identifying the officers, as well as to prevent Abu Zubaydah "from seeing the security guards as individuals who he may attempt to establish a relationship or dialogue with."... In addition, either loud
rock music was played or noise generators were used to enhance Abu Zubaydah's "sense of hopelessness."' Abu Zubaydah was typically kept naked and sleep deprived.


The "aggressive phase of interrogation" continued until August 23,
2002. Over the course ofthe entire 20 day "aggressive phase of interrogation," Abu Zubaydah spent a total of 266 hours (11 days, 2 hours) in the large (coffin size) confinement box and 29 hours in a small confinement box, which had a width of 21 inches, a depth of 2.5 feet, and a height of 2.5 feet. The CIA interrogators told Abu Zubaydah that the only way he would leave
the facility was in the coffin-shaped confinement box.

According to the daily cables from DETENTION SITE GREEN,
Abu Zubaydah frequently "cried," "begged," "pleaded," and "whimpered," but continued to deny that he had any additional information on current threats to, or operatives in, the United States.


After approximately three weeks, the CIA developed a more aggressive treatment regimen "without unnecessary conversation." Majid Khan was then subjected to involuntary rectal feeding and rectal hydration, which included two bottles of Ensure. Later that same day, Majid Khan's "lunch tray," consisting of hummus, pasta with sauce, nuts, and raisins, was "pureed" and rectally infused. Additional sessions ofrectal feeding and hydration followed. In addition to his hunger strikes, Majid Klian engaged in acts of self-harm that included attempting to cut his wrist on two occasions, an attempt to chew into his arm at the inner elbow, an attempt to cut a vein in the top of his foot, and an attempt to cut into his skin at the elbow joint using a filed toothbrush.