def dataToString(var, data):
    """Given a tuple of data, and a name to save it as
    returns var <- c(data)
    """
    #convert data to strings
    d = [str(d) for d in data]
    return "%s <- c(%s)" % (var, ",".join(d))