Here are two ways to get your data into an object that you can run the test on. In the first, I typed your data into a csv file and read it with read.csv(). Note that I used the first column as row names by setting row.names = 1 when I called read.csv(). In the second, I made a matrix of the data, typing it directly into the R code.
DF <- read.csv("c:/users/fjcc/Documents/R/Play/Dummy.csv", row.names = 1)
DF
#> decrease no_change increase
#> control 40 289 41
#> drug 23 6 71
chisq.test(DF)
#>
#> Pearson's Chi-squared test
#>
#> data: DF
#> X-squared = 192.55, df = 2, p-value < 2.2e-16
#Hand enter the dataa
TBL <- matrix(c(40, 23, 289, 6, 41, 71), nrow = 2)
TBL
#> [,1] [,2] [,3]
#> [1,] 40 289 41
#> [2,] 23 6 71
chisq.test(TBL)
#>
#> Pearson's Chi-squared test
#>
#> data: TBL
#> X-squared = 192.55, df = 2, p-value < 2.2e-16
Created on 2020-04-12 by the reprex package (v0.3.0)