openair function windRose() and I keep getting an error (seems to be related to column names maybe

114 Views Asked by At

I am trying to create a windrose using the windRose() function in the openair package in R.

My data is in a dataframe called "data" which I uploaded from a .csv as as follows:

  ws             wd
  48.73114346    283.0710393
  61.49549084    243.7564505
  58.09342342    247.352044
  51.67627266    239.3605634
  19.52216981    304.2319862
  35.84687489    247.7485105
  39.84257171    284.7447041
  8.746914352    272.7665055
  32.43617745    289.2658996
  73.99142206    219.3024352
  62.94058264    269.3222006
  36.26804775    209.7422713

my code is windRose(data)

but keep getting the following error:

Error: Problem with mutate() input ..1. x Can't subset columns that don't exist. x Column default doesn't exist. i Input ..1 is across(type). i The error occurred in group 1: default = "all data".

I have tried specifying the column names so windRose(data, ws = "ws", wd = "wd") but this made no difference.

Any help would be much appreciated

0

There are 0 best solutions below