I was not able to convert a netcdf file opened by open.ncdf() to raster as described by Hendrik above. The reason being that raster() requires the filename, not a netcdf connection.
A netcdf file can be opened directly in raster() and then subsequently written to a geotiff using writeRaster(). For example like this example using downloaded bathymetry data from GEBCO:
I was not able to convert a netcdf file opened by open.ncdf() to raster as described by Hendrik above. The reason being that raster() requires the filename, not a netcdf connection.
A netcdf file can be opened directly in raster() and then subsequently written to a geotiff using writeRaster(). For example like this example using downloaded bathymetry data from GEBCO:
Just wanted to add that as Guilherme Marting said, a simple gdal_translate can really work well. Now, you have to make sure that your NetCDF file has not curvilinear coordinates but lonlat. Otherwise the conversion works but is not georeferenced adequately (each pixel = 1º).