Data in R
To run your code, click run. It will let you know if your code is correct or not, and will offer hints on what to fix if needed. If you are stuck, you can see the solution by clicking Solution.
Exercise 1: Using mutate() and lead()
eyJsYW5ndWFnZSI6InIiLCJwcmVfZXhlcmNpc2VfY29kZSI6ImxpYnJhcnkoZHBseXIpICMgbG9hZHMgZHBseXIgZm9yIGRhdGEgbWFuaXB1bGF0aW9uXG5kZiA8LSBkYXRhLmZyYW1lKGNvbXBhbnk9YyhcIlVPTCBHcm91cFwiLCBcIlVPTCBHcm91cFwiLCBcIlVPTCBHcm91cFwiLCBcIlVuaXRlZCBFbmdpbmVlcnMgTHRkXCIsIFwiVW5pdGVkIEVuZ2luZWVycyBMdGRcIiwgXCJVbml0ZWQgRW5naW5lZXJzIEx0ZFwiLCBcIlRvcCBHbG9iYWwgTHRkXCIsIFwiVG9wIEdsb2JhbCBMdGRcIiwgXCJUb3AgR2xvYmFsIEx0ZFwiKSxcbiAgICAgICAgICAgICAgICAgeWVhcj1jKDIwMTAsIDIwMTEsIDIwMTIsIDIwMTAsIDIwMTEsIDIwMTIsIDIwMTAsIDIwMTEsIDIwMTIpLFxuICAgICAgICAgICAgICAgICByZXZlbnVlPWMoMTI5NSwgMTk2MCwgMTE0NiwgOTAxLCAxMTg3LCA1OTUsIDQuNSwgNC44LCA1LjUpLFxuICAgICAgICAgICAgICAgICBhc3NldHM9Yyg3OTM5LCA4NTI0LCA5NTY0LCAyNDEwLCAzMDgwLCAzNDUxLCAxMDksIDEyNSwgMjk1KSxcbiAgICAgICAgICAgICAgICAgZWFybmluZ3M9Yyg3NDYsIDY2NCwgODA4LCAxODYsIDI2OSwgNzIsIC03LjUsIDE2LCAxNikpXG5kZiA8LSBkZiAlPiVcbiAgbXV0YXRlKHJvYT1lYXJuaW5ncy9hc3NldHMpIiwic2FtcGxlIjoiIyBUaGUgZGF0YWZyYW1lIGJlbG93IGNvbnRhaW5zIGhpc3RvcmljYWwgZWFybmluZ3MsIHJldmVudWUsIGFzc2V0cyxcbiMgYW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