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
// included in mcpher library - GAS key MEQ3tE5y5_cTOAgUbUKSIAiz3TLx7pV4j | |
// ramblings.mcpher.com | |
/** | |
* performs a melt reshape | |
* @param {object|string} options describes the melt actions required as either js object or jSon string | |
* @return {cDataSet} The populated sheet as a cDataSet | |
*/ | |
function reshapeMelt (options) { | |
// this is a very basic start at gas implementation of Hadley Wickhams melt(R) |
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
Option Explicit | |
Public Function reshapeMelt(options As String) As cDataSet | |
' this is a very basic start at vba implementation of Hadley Wickhams melt(R) | |
' http://www.statmethods.net/management/reshape.html | |
Dim jArgs As cJobject, ds As cDataSet, cj As cJobject, _ | |
R As Range, ws As Worksheet, dr As cDataRow, dsOut As cDataSet, _ | |
dc As cCell, dsre As cDataSet | |
' sort out the options |
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
/** @description | |
* javaScript/Google Apps script functions that are equivalent to common VBA functions | |
* in general these provide the same functionality and have the same calling stack | |
* See http://ramblings.mcpher.com/Home/excelquirks/codeuse for more details | |
* @author <a href="mailto:[email protected]">Bruce McPherson</a><a href="http://ramblings.mcpher.com"> ramblings.mcpher.com</a> | |
*/ | |
/** | |
* Removes leading and trailing whitespace | |
* @param {string|number} v the item to be trimmed |
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
You can download cDataSet.xlsm from | |
http://ramblings.mcpher.com/Home/excelquirks/json/rest | |
The Google Apps script version is here | |
https://docs.google.com/spreadsheet/ccc?key=0At2ExLh4POiZdFAzUElyTGNQLW90aEFKeHhJZDR1WWc | |
(requires in mcpher library - GAS key MEQ3tE5y5_cTOAgUbUKSIAiz3TLx7pV4j | |
- details at https://gist.github.com/3358690) |
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
You can download cDataSet.xlsm from | |
http://ramblings.mcpher.com/Home/excelquirks/json/rest | |
The Google Apps script version is here | |
https://docs.google.com/spreadsheet/ccc?key=0At2ExLh4POiZdFAzUElyTGNQLW90aEFKeHhJZDR1WWc | |
(requires in mcpher library - GAS key MEQ3tE5y5_cTOAgUbUKSIAiz3TLx7pV4j | |
- details at https://gist.github.com/3358690) |
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
<gistThat info="this is a manifest for gistThat VBA code distribution - see ramblings.mcpher.com for details"><manifest description="r-melt implementation for VBA" contact="[email protected]"><gists><item1 gistid="3357942" version="" filename="rstuff.vba" module="rstuff"/><item2 gistid="3357942" version="" filename="rstuffsheet.vba" module="rstuffSheet"/></gists></manifest></gistThat> |
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
'IMPORTANT - CHANGE gtExampleLoad() to include gtDoit() for each Gist you want to load | |
' bootstrap code to update VBA modules from gists | |
' all code is in this module - so no classes etc. | |
' latebinding is used to avoid need for any references | |
' can be found at https://gist.github.com/3403537 | |
Option Explicit | |
' v2.04 - 3403537 | |
' if you are using your own gists - change this | |
Const gistOwner = "brucemcpherson" |
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
'[email protected] :do not modify this line - see ramblings.mcpher.com for details: updated on 14/11/2013 18:02:03 : from manifest:3414394 gist https://gist.github.com/brucemcpherson/3414216/raw/cCell.cls | |
' a data Cell - holds value at time of loading, or can be kept fresh if there might be formula updates | |
Option Explicit | |
' Version 2.04 - | |
'for more about this | |
' http://ramblings.mcpher.com/Home/excelquirks/classeslink/data-manipulation-classes | |
'to contact me | |
' http://groups.google.com/group/excel-ramblings | |
'reuse of code | |
' http://ramblings.mcpher.com/Home/excelquirks/codeuse |
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
'[email protected] :do not modify this line - see ramblings.mcpher.com for details: updated on 8/18/2014 3:54:19 PM : from manifest:7471153 gist https://gist.github.com/brucemcpherson/3414346/raw | |
Option Explicit | |
' v2.23 3414346 | |
' Acknowledgement for the microtimer procedures used here to | |
' thanks to Charles Wheeler - http://www.decisionmodels.com/ | |
' --- | |
#If VBA7 And Win64 Then |
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
'[email protected] :do not modify this line - see ramblings.mcpher.com for details: updated on 8/9/2014 3:09:42 PM : from manifest:3414394 gist https://gist.github.com/brucemcpherson/3414365/raw | |
' this is used for object serliazation. Its just basic JSON with only string data types catered for | |
Option Explicit | |
' v2.19 3414365 | |
'for more about this | |
' http://ramblings.mcpher.com/Home/excelquirks/classeslink/data-manipulation-classes | |
'to contact me | |
' http://groups.google.com/group/excel-ramblings | |
'reuse of code | |
' http://ramblings.mcpher.com/Home/excelquirks/codeuse |
OlderNewer