Keep the file in the same folder where the RMarkdown file is located and read the file

dataset = read.csv("CC.csv",header = TRUE)
#rpivotTable(dataset)
rpivotTable(dataset, rows = "Gender", aggregatorName = "Sum",vals = "Amount", rendererName = "Heatmap", width = 800,height = 600)
rpivotTable(dataset, rows = "Exp.Type", cols = "Card.Type", aggregatorName = "Sum",vals = "Amount", rendererName = "Horizontal Stacked Bar Chart",  width = 800,height = 600)