The other idea I had (which is somewhat silly) is to use the digest library
to create a sha1 hash string for the right key we want and to see which
items in the list hashes to that.  I don't know if that's algorithmically
any faster though.  (Probably slower?)


On Thu, Feb 13, 2014 at 8:57 PM, Tommy Shen <gimperion@gmail.com> wrote:

> I tried to look up code for comparing lists in R on Stackoverflow but I
> didn't really find anything.  Otherwise I was going to create a key.json
> file within the directory, load it into memory and look for that particular
> key.
>
>
> On Thu, Feb 13, 2014 at 8:55 PM, Harlan Harris <notifications@github.com>wrote:
>
>> In data/pull_process.R:
>>
>> > @@ -136,15 +152,20 @@ buildGradStruct <- function(df, sc) {
>> >  # and put into a DF
>> >  makeAcademicGrowthDF <- function(profiles) {
>> >      ldply(profiles, function(pf) {
>> > -        sections <- pf$report_card$sections
>> > -        read_score <- try_default(sections[[1]]$data[[1]]$subgroups[[1]]$read_score,
>> > +        mgp_chunk <- pf$all_data$mgp_scores
>> > +        names(mgp_chunk$data) <- unlist(lapply(mgp_chunk$data, function(x){paste(x$key$subject, x$key$subgroup, x$key$year, sep="_")}))
>> > +
>> > +        read_score <- try_default(n2na(mgp_chunk$data$`Reading_All_2012`$val$mgp_1yr),
>>
>> Hm, that's obviously a hack, although I don't know what's better. In
>> theory, what's the right way to do this?
>>
>> --
>> Reply to this email directly or view it on GitHub<https://github.com/code-for-dc-edu/school-chooser/pull/43/files#r9737039>
>> .
>>
>
>