def parse_r_imports(list_of_code):
    """ Parse imports for R code cells """
    imports = []
    for code in list_of_code:
        code = code.replace("\\n","").replace("\n","")
        im = None
        if "library(" in code and not code.startswith("#"):
            im = code.split("library(")[1].split(")")[0]
            imports.append((im, ""))
            
        if "require(" in code and not code.startswith("#"):
            im = code.split("require(")[1].split(")")[0]
            imports.append((im,""))
            
    return imports