Limiting the number of decimals in a dataframe (R) -
I import a data frame, when I want to limit the number of decades column in my .txt input "value "In each row is 16 decimals. My dataframe looks like this:
value 0.202021561664556 0.202021561664556 0.202021561664556 0.202021561664556 ... my expected dataframe value 0.20202156 0.20202156 0.20202156 0.20202156 ... Actual input (DF) that does not work:
DF < - "NE001358.Log.R.Ratio -0.0970369274475688 0.131893549586039 0.0629266495860389 0.299559132381831 -0.0128804337656807 0.0639743960526874 0.0271669351886552 0.322395363972391 0.179591292893632" DF & lt; is.num is TRUE numeric column and FALSE otherwise we apply the round in the numeric column: > is.num & lt; - sapply (df, is.numeric) df [is.num] Print (DF, Issue = 8)
Comments
Post a Comment