RstudioでExcelファイルを読み込もうとしてもエラーになります。

[code]

    install.packages('openxlsx')
    library(openxlsx)  
    X <- read.xlsx("data6.xlsx")
    
[/code]

[code]

    >X <- read.xlsx("data6.xlsx")
    Error in read.xlsx("data6.xlsx") : could not find function "read.xlsx"
    
[/code]

