Analysis in R: Clipboard data in and out! The “clipr” package

RAnalytics
スポンサーリンク

This is an introduction to a package that is useful for “reading and writing” clipboard data. You can manipulate the clipboard with commands without using this package, but it is slightly different and cumbersome depending on the OS environment. This package allows you to manipulate the clipboard without worrying about the OS environment.

Why not use it when you need to quickly process overflowing data from the web in R?

Package version is 0.8.0. Checked with R version 4.2.2.

スポンサーリンク

Install Package

Run the following command.

#Install Package
install.packages("clipr")

Example

See the command and package help for details.

#Loading the library
library("clipr")

###Creating Data#####
n <- 150
TestData <- data.frame("SubGroup" = sample(c("KA", "RA", "DA"), n, replace = TRUE),
                       "ID" = sample(letters[1:24], n, replace = TRUE),
                       "Area" = 1:n, "Point" = 0.1:(0.1*n),
                       "Facet" = sample(letters[1:2], n, replace = TRUE),
                       "No" = sample(1:10, n, replace = TRUE))
########

#Writes example data to the clipboard:write_clip command
#Specify data line breaks:sep option
#Add charactor at the end:eos option;Display nothing:NULL
write_clip(content = TestData, sep = NULL, eos = NULL)

#Reads example data to the clipboard:read_clip command
#Note that the read_clip command does not support image copying
#Execute after copying the above two lines
read_clip()
[1] "#Reads example data to the clipboard:read_clip command"         
[2] "#Note that the read_clip command does not support image copying"

I hope this makes your analysis a little easier !!

Amazon audibleの登録の紹介

プライム会員限定で2024年7月22日まで3か月無料体験キャンペーン開催中です。無料体験後は月額1,500円で聞き放題です。なお、聞き放題対象外の本はAudible会員であれば非会員価格の30%引きで購入することが可能です。

Amazon audibleはプロのナレーターが朗読した本をアプリで聞くことができるサービスで、オフライン再生も可能です。通勤や作業のお供にAmazon audibleのご登録はいかがでしょうか。

・AmazonのAudible

https://amzn.to/3L4FI5o

Copied title and URL