This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
// 0. Download this file as GJBehavior.cs | |
// 1. Attach this script to a new GameObject and rename it to "GJAPI". | |
// 2. Edit game and api key | |
// 3. To post score from anywhere | |
// if (GameObject.Find("GJAPI").GetComponent<GJBehavior>().CanAddScore) | |
// GJAPI.Scores.Add(score.ToString() + " points", (uint)score, 14669, ""); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
isNestedDataFrame <- function(df) { | |
cols = colnames(df) | |
for (col in 1:ncol(df)) { | |
c <- df[[cols[col]]] | |
if (is.data.frame(c)) { | |
return (TRUE) | |
} | |
} | |
return (FALSE) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Example data.json | |
[{"event":"glop","params":{"name":"toto","value":"glop"}}, | |
{"event":"glot","params":{"name":"toto","info":"gggg"}}, | |
{"event":"gogo","params":"text"}, | |
{"event":"gogo2"} | |
]; | |
## Expected output | |
event params.name params.value params.info params | |
1 glop toto glop <NA> <NA> |