This is more of a methodological problem than a coding problem. There are at least two issues.
- Six points may not be very informative
- Sequentially ordered observations * may*present autocorrelation issues, which violates an assumption in obtaining R^2
x <- seq(1:6)
y <- c(17.2,11.0,15,4,9,12)
plot(x,y)

fit <- lm(x ~ y)
summary(fit)
#>
#> Call:
#> lm(formula = x ~ y)
#>
#> Residuals:
#> 1 2 3 4 5 6
#> -1.3348 -1.5732 0.2258 -0.9715 1.0273 2.6265
#>
#> Coefficients:
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) 5.7705 2.1244 2.716 0.0532 .
#> y -0.1998 0.1751 -1.141 0.3177
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#>
#> Residual standard error: 1.817 on 4 degrees of freedom
#> Multiple R-squared: 0.2454, Adjusted R-squared: 0.05676
#> F-statistic: 1.301 on 1 and 4 DF, p-value: 0.3177
par(mfrow = c(2,2))
plot(fit)

gvlma::gvlma(fit)
#>
#> Call:
#> lm(formula = x ~ y)
#>
#> Coefficients:
#> (Intercept) y
#> 5.7705 -0.1998
#>
#>
#> ASSESSMENT OF THE LINEAR MODEL ASSUMPTIONS
#> USING THE GLOBAL TEST ON 4 DEGREES-OF-FREEDOM:
#> Level of Significance = 0.05
#>
#> Call:
#> gvlma::gvlma(x = fit)
#>
#> Value p-value Decision
#> Global Stat 3.0222 0.5541 Assumptions acceptable.
#> Skewness 0.3768 0.5393 Assumptions acceptable.
#> Kurtosis 0.2369 0.6264 Assumptions acceptable.
#> Link Function 1.6805 0.1949 Assumptions acceptable.
#> Heteroscedasticity 0.7279 0.3936 Assumptions acceptable.
Created on 2020-09-29 by the reprex package (v0.3.0.9001)