Adjusted summarizeLC function to use "getValues" instead of LCraster@data@values to avoid an error. Testing to see if it works better.