Skip to content
Advertisement

Tag: r

how to use untar() in R linux?

I’m getting this error when I use untar() command used: untar(tarfile = “a.rar”, list = TRUE) It works when I use on my PC (Windows 10) but does not works on another PC (Linux 20.04) Thanks Answer This isn’t correct: You should specify a tape archive file such as “a.tar”, rather than a RAR-format file. The underlying utility on Windows

Can anyone help me with this crontab?

We want to download the stock price of Tesla every day, using the package “quantmod” in R. We managed to write the function that downloads the last available stock and store it in a database in SQL: indeed, if we run the function manually, we can see the table with the stock price of today. However, if we let it

Adding data based on date from another dataframe

I have two datasets. One with multiple dates: and one with sunrise and sunsets data: I want to add a column to the first dataframe with either “Day” or “night”, based on whether the date and time from the first dataframe is between the sunrise and sunset time and dates. I tried copying and if_else functions, but the length of

Remove specific value in R or Linux

Hi I have a file (tab sep) in terminal that has several columns as below. You can see last column has a comma in between followed by one or more characters. 1 100 Japan Na pa,cd 2 120 India Ca pa,ces 5 110 Japan Ap pa,cres 1 540 China Sn pa,cd 1 111 Nepal Le pa,b I want to keep

merge different files into 1 text file in R

I have two files with one being text, and the other being a data frame, now I just want to merge them into one as a text file. With linux, I can use: I wonder if we can do the same thing with R? Thanks alot Phuong Answer We can use file.append: Or if files are already imported into R,

How to install R library “ggpubr” in a Docker image?

I tried to install the R library ggpubr in a docker image. I pulled the r-base:3.6.3 and the following is my Dockerfile: and here is my Rinstall_packages.R file: each time I got the output like this: I tried to install the library in batch mode: It works. However, after I exited the bash, I still can not use the library.

Advertisement