Displaying 6 results from an estimated 6 matches for "previous_loc".
2018 May 08
3
Bilateral matrix
or in base R : ?xtabs ??
as in:
xtabs(~previous_location + current_location,data=x)
(You can convert the 0s to NA's if you like)
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip...
2018 May 16
0
Bilateral matrix
...ourse people have not moved from Boston to all the other 24 cities. I
would like all the combinations if possible.
Thank you again!
Sincerely,
Milu
On Tue, May 8, 2018 at 6:28 PM, Bert Gunter <bgunter.4567 at gmail.com> wrote:
> or in base R : ?xtabs ??
>
> as in:
> xtabs(~previous_location + current_location,data=x)
>
> (You can convert the 0s to NA's if you like)
>
>
> Cheers,
> Bert
>
>
>
> Bert Gunter
>
> "The trouble with having an open mind is that people keep coming along and
> sticking things into it."
> -- Opus (aka...
2018 May 16
2
Bilateral matrix
.... I
> would like all the combinations if possible.
>
> Thank you again!
>
> Sincerely,
>
> Milu
>
> On Tue, May 8, 2018 at 6:28 PM, Bert Gunter <bgunter.4567 at gmail.com>
> wrote:
>
>> or in base R : ?xtabs ??
>>
>> as in:
>> xtabs(~previous_location + current_location,data=x)
>>
>> (You can convert the 0s to NA's if you like)
>>
>>
>> Cheers,
>> Bert
>>
>>
>>
>> Bert Gunter
>>
>> "The trouble with having an open mind is that people keep coming along
>>...
2018 May 08
2
Bilateral matrix
...rrent_location = structure(c(2L,
8L, 8L, 3L, 6L, 5L, 1L, 2L, 7L, 4L, 2L, 8L, 8L, 3L, 6L), .Label =
c("Austin",
"Boston", "Cambridge", "Durham", "Houston", "Lynn", "New Orleans",
"New York"), class = "factor"), previous_location = structure(c(6L,
2L, 4L, 6L, 7L, 5L, 1L, 3L, 6L, 2L, 6L, 2L, 4L, 6L, 7L), .Label =
c("Atlanta",
"Austin", "Cleveland", "Houston", "New Orleans", "OKC", "Tulsa"
), class = "factor")), class = "data.frame"...
2018 May 08
0
Bilateral matrix
...rrent_location = structure(c(2L,
8L, 8L, 3L, 6L, 5L, 1L, 2L, 7L, 4L, 2L, 8L, 8L, 3L, 6L), .Label =
c("Austin",
"Boston", "Cambridge", "Durham", "Houston", "Lynn", "New Orleans",
"New York"), class = "factor"), previous_location = structure(c(6L,
2L, 4L, 6L, 7L, 5L, 1L, 3L, 6L, 2L, 6L, 2L, 4L, 6L, 7L), .Label =
c("Atlanta",
"Austin", "Cleveland", "Houston", "New Orleans", "OKC", "Tulsa"
), class = "factor")), class = "data.frame"...
2018 May 17
0
Bilateral matrix
...ided a better sample of the data and the ideal output (wide form
- a 10x10 bilateral matrix) but haven't been able to do this. Would it be
easier if I create variable for each ID - it would be equal to 1 if the
person moved? I am a bit lost - thank you again!
### data
structure(list(ID = 1:12, previous_location. = structure(c(3L,
9L, 8L, 10L, 2L, 5L, 1L, 7L, 4L, 6L, 10L, 5L), .Label = c("Atlanta",
"Austin", "Boston", "Cambridge", "Dallas", "Durham", "Lynn",
"New Orleans", "New York", "OKC"), class = &q...