puppet augeas resource only support avalialbe lenses - puppet

I am automating rhnplugin config file in puppet, below is my manifests
augeas { 'config' :
lens => 'Simplevars.lns',
incl => '/etc/yum/pluginconf.d/rhnplugin.conf',
changes => 'set /etc/yum/pluginconf.d/rhnplugin.conf/test " " '
}
getting below error
Warning: Augeas[config](provider=augeas): Loading failed for one or more files, see debug for /augeas//error outputeven
I tried with "simplelines lenses" not getting any o/p
I used "simplelines and simplevars" since could not find lenses for rhnplugin.
I treid in augtool and it worked
augtool> set /files/etc/yum/pluginconf.d/rhnplugin.conf/test
augtool> save
Saved 1 file(s)
augtool> set /files/etc/yum/pluginconf.d/rhnplugin.conf/test/enabled 1
augtool> save
Saved 1 file(s)
augtool> print /files/etc/yum/pluginconf.d/rhnplugin.conf/test
/files/etc/yum/pluginconf.d/rhnplugin.conf/test
/files/etc/yum/pluginconf.d/rhnplugin.conf/test/enabled = "1"
My doubt is can't we convert int to augeas resource if the lenses are not available.

rhnplugin.conf is not in a simplevars (i.e. key=value) format. It is an inifile. My recommendation would be to use puppet labs' inifile module to modify it.

Related

Building content shell as final and sharing

everything good? I'm doing working on a personal project that aims to use the content_shell as a minimal browser, just for viewing sites on terminals and some other options I'm adding. For this I am using the content shell I built it in Ubuntu 16.04 with the following flags ng:
is_debug = false
is_java_debug = false
is_official_build = true
target_cpu = "x86"
symbol_level = 0
remove_webcore_debug_symbols = true
enable_nacl = false
is_component_build = true
He generated all of these files:
AHEM____.TTF
angledata
args.gn
brotli
build.ninja
build.ninja.d
character_data_generator
clang_newlib_x64
content_shell
content_shell.log
content_shell.pak
fonts.conf
font_service.service
GardinerModBug.ttf
GardinerModCat.ttf
gen
genmacro
genmodule
genperf
genstring
genversion
glibc_x64
icudtl.dat
irt_x64
libaccessibility.so
libaccessibility.so.TOC
libanimation.so
libanimation.so.TOC
libaura_extra.so
libaura_extra.so.TOC
libaura.so
libaura.so.TOC
libbase_i18n.so
libbase_i18n.so.TOC
libbase.so
libbase.so.TOC
libbindings.so
libbindings.so.TOC
libblink_android_mojo_bindings_shared.so
libblink_android_mojo_bindings_shared.so.TOC
libblink_common.so
libblink_common.so.TOC
libblink_controller.so
libblink_controller.so.TOC
libblink_core.so
libblink_core.so.TOC
libblink_deprecated_test_plugin.so
libblink_modules.so
libblink_modules.so.TOC
libblink_mojo_bindings_shared.so
libblink_mojo_bindings_shared.so.TOC
libblink_offscreen_canvas_mojo_bindings_shared.so
libblink_offscreen_canvas_mojo_bindings_shared.so.TOC
libblink_platform.so
libblink_platform.so.TOC
libblink_test_plugin.so
libbluetooth.so
libbluetooth.so.TOC
libboringssl.so
libboringssl.so.TOC
libcapture_base.so
libcapture_base.so.TOC
libcapture_lib.so
libcapture_lib.so.TOC
libcc_animation.so
libcc_animation.so.TOC
libcc_base.so
libcc_base.so.TOC
libcc_blink.so
libcc_blink.so.TOC
libcc_debug.so
libcc_debug.so.TOC
libcc_ipc.so
libcc_ipc.so.TOC
libcc_paint.so
libcc_paint.so.TOC
libcc.so
libcc.so.TOC
libcdm_manager.so
libcdm_manager.so.TOC
libchromium_sqlite3.so
libchromium_sqlite3.so.TOC
libcodec.so
libcodec.so.TOC
libcolor_space.so
libcolor_space.so.TOC
libcompositor.so
libcompositor.so.TOC
libcontent_common_mojo_bindings_shared.so
libcontent_common_mojo_bindings_shared.so.TOC
libcontent_public_common_mojo_bindings_shared.so
libcontent_public_common_mojo_bindings_shared.so.TOC
libcontent.so
libcontent.so.TOC
libcrcrypto.so
libcrcrypto.so.TOC
libc++.so
libc++.so.TOC
libdbus.so
libdbus.so.TOC
libdevice_base.so
libdevice_base.so.TOC
libdevice_event_log.so
libdevice_event_log.so.TOC
libdevice_gamepad.so
libdevice_gamepad.so.TOC
libdevices.so
libdevices.so.TOC
libdevice_vr_mojo_bindings_blink.so
libdevice_vr_mojo_bindings_blink.so.TOC
libdevice_vr_mojo_bindings_shared.so
libdevice_vr_mojo_bindings_shared.so.TOC
libdevice_vr_mojo_bindings.so
libdevice_vr_mojo_bindings.so.TOC
libdiscardable_memory_client.so
libdiscardable_memory_client.so.TOC
libdiscardable_memory_common.so
libdiscardable_memory_common.so.TOC
libdiscardable_memory_service.so
libdiscardable_memory_service.so.TOC
libdisplay.so
libdisplay.so.TOC
libdisplay_types.so
libdisplay_types.so.TOC
libdisplay_util.so
libdisplay_util.so.TOC
libEGL.so
libEGL.so.TOC
libembedder.so
libembedder.so.TOC
libevents_base.so
libevents_base.so.TOC
libevents_devices_x11.so
libevents_devices_x11.so.TOC
libevents_ozone_layout.so
libevents_ozone_layout.so.TOC
libevents.so
libevents.so.TOC
libevents_x.so
libevents_x.so.TOC
libffmpeg.so
libffmpeg.so.TOC
libfingerprint.so
libfingerprint.so.TOC
libfreetype.so.6
libfreetype.so.6.TOC
libgeolocation.so
libgeolocation.so.TOC
libgeometry_skia.so
libgeometry_skia.so.TOC
libgeometry.so
libgeometry.so.TOC
libgesture_detection.so
libgesture_detection.so.TOC
libgfx_ipc_color.so
libgfx_ipc_color.so.TOC
libgfx_ipc_geometry.so
libgfx_ipc_geometry.so.TOC
libgfx_ipc_skia.so
libgfx_ipc_skia.so.TOC
libgfx_ipc.so
libgfx_ipc.so.TOC
libgfx.so
libgfx.so.TOC
libgfx_switches.so
libgfx_switches.so.TOC
libgfx_x11.so
libgfx_x11.so.TOC
libgin.so
libgin.so.TOC
libgles2_c_lib.so
libgles2_c_lib.so.TOC
libgles2_implementation.so
libgles2_implementation.so.TOC
libgles2_utils.so
libgles2_utils.so.TOC
libGLESv2.so
libGLESv2.so.TOC
libgl_init.so
libgl_init.so.TOC
libgl_in_process_context.so
libgl_in_process_context.so.TOC
libgl_wrapper.so
libgl_wrapper.so.TOC
libgpu.so
libgpu.so.TOC
libhost.so
libhost.so.TOC
libicui18n.so
libicui18n.so.TOC
libicuuc.so
libicuuc.so.TOC
libinterfaces_shared.so
libinterfaces_shared.so.TOC
libipc_mojom_shared.so
libipc_mojom_shared.so.TOC
libipc_mojom.so
libipc_mojom.so.TOC
libipc.so
libipc.so.TOC
libjs.so
libjs.so.TOC
libkeycodes_x11.so
libkeycodes_x11.so.TOC
libkeyed_service_content.so
libkeyed_service_content.so.TOC
libkeyed_service_core.so
libkeyed_service_core.so.TOC
libmedia_blink.so
libmedia_blink.so.TOC
libmedia_gpu.so
libmedia_gpu.so.TOC
libmedia_mojo_services.so
libmedia_mojo_services.so.TOC
libmedia.so
libmedia.so.TOC
libmetrics_cpp.so
libmetrics_cpp.so.TOC
libmidi.so
libmidi.so.TOC
libmirclient.so.9
libmirclient.so.9.TOC
libmojo_common_lib.so
libmojo_common_lib.so.TOC
libmojo_ime_lib.so
libmojo_ime_lib.so.TOC
libmojo_public_system_cpp.so
libmojo_public_system_cpp.so.TOC
libmojo_public_system.so
libmojo_public_system.so.TOC
libmojo_system_impl.so
libmojo_system_impl.so.TOC
libnative_theme.so
libnative_theme.so.TOC
libnet.so
libnet.so.TOC
libnet_with_v8.so
libnet_with_v8.so.TOC
libosmesa.so
libplatform.so
libplatform.so.TOC
libppapi_host.so
libppapi_host.so.TOC
libppapi_proxy.so
libppapi_proxy.so.TOC
libppapi_shared.so
libppapi_shared.so.TOC
libprefs.so
libprefs.so.TOC
libprinting.so
libprinting.so.TOC
libprotobuf_lite.so
libprotobuf_lite.so.TOC
librange.so
librange.so.TOC
libresource_coordinator_cpp.so
libresource_coordinator_cpp.so.TOC
libresource_coordinator_public_interfaces_internal_shared.so
libresource_coordinator_public_interfaces_internal_shared.so.TOC
libsandbox_services.so
libsandbox_services.so.TOC
libseccomp_bpf.so
libseccomp_bpf.so.TOC
libsensors.so
libsensors.so.TOC
libservice_manager_cpp.so
libservice_manager_cpp.so.TOC
libservice_manager_cpp_types.so
libservice_manager_cpp_types.so.TOC
libservice_manager_mojom_blink.so
libservice_manager_mojom_blink.so.TOC
libservice_manager_mojom_constants_blink.so
libservice_manager_mojom_constants_blink.so.TOC
libservice_manager_mojom_constants_shared.so
libservice_manager_mojom_constants_shared.so.TOC
libservice_manager_mojom_constants.so
libservice_manager_mojom_constants.so.TOC
libservice_manager_mojom_shared.so
libservice_manager_mojom_shared.so.TOC
libservice_manager_mojom.so
libservice_manager_mojom.so.TOC
libservice.so
libservice.so.TOC
libshared_memory_support.so
libshared_memory_support.so.TOC
libshell_dialogs.so
libshell_dialogs.so.TOC
libskia.so
libskia.so.TOC
libsnapshot.so
libsnapshot.so.TOC
libsql.so
libsql.so.TOC
libstartup_tracing.so
libstartup_tracing.so.TOC
libstorage_browser.so
libstorage_browser.so.TOC
libstorage_common.so
libstorage_common.so.TOC
libstub_window.so
libstub_window.so.TOC
libsuid_sandbox_client.so
libsuid_sandbox_client.so.TOC
libsurface.so
libsurface.so.TOC
libtest_runner.so
libtest_runner.so.TOC
libtracing.so
libtracing.so.TOC
libui_base_ime.so
libui_base_ime.so.TOC
libui_base.so
libui_base.so.TOC
libui_base_x.so
libui_base_x.so.TOC
libui_data_pack.so
libui_data_pack.so.TOC
libui_touch_selection.so
libui_touch_selection.so.TOC
libui_views_mus_lib.so
libui_views_mus_lib.so.TOC
liburl_ipc.so
liburl_ipc.so.TOC
liburl.so
liburl.so.TOC
libuser_prefs.so
libuser_prefs.so.TOC
libv8_libbase.so
libv8_libbase.so.TOC
libv8_libplatform.so
libv8_libplatform.so.TOC
libv8.so
libv8.so.TOC
libviews.so
libviews.so.TOC
libviz_common.so
libviz_common.so.TOC
libviz_resource_format.so
libviz_resource_format.so.TOC
libVkLayer_core_validation.so
libVkLayer_core_validation.so.TOC
libVkLayer_object_tracker.so
libVkLayer_object_tracker.so.TOC
libVkLayer_parameter_validation.so
libVkLayer_parameter_validation.so.TOC
libVkLayer_swapchain.so
libVkLayer_swapchain.so.TOC
libVkLayer_threading.so
libVkLayer_threading.so.TOC
libVkLayer_unique_objects.so
libVkLayer_unique_objects.so.TOC
libweb_dialogs.so
libweb_dialogs.so.TOC
libwebview.so
libwebview.so.TOC
libwm_public.so
libwm_public.so.TOC
libwm.so
libwm.so.TOC
libwtf.so
libwtf.so.TOC
libx11_events_platform.so
libx11_events_platform.so.TOC
libx11_window.so
libx11_window.so.TOC
locales
mksnapshot
mus_app_resources_100.pak
mus_app_resources_200.pak
mus_app_resources_strings.pak
nacl_bootstrap_x64
natives_blob.bin
newlib_pnacl
newlib_pnacl_nonsfi
obj
protoc
proto_zero_plugin
pyproto
re2c
resources
shell_resources.pak
snapshot_blob.bin
swiftshader
test_ime_driver.service
toolchain.ninja
transport_security_state_generator
ui
ui_resources_100_percent.pak
ui.service
ui_test.pak
v8_build_config.json
v8_context_snapshot.bin
v8_context_snapshot_generator
views_mus_resources.pak
yasm
How do I make all these files with the same structure as the official Chromium? I removed the folders I do not need and the files add up to about 1.7 GB I want to share with others my project. I have already researched and am looking here in the group something about this but I have not yet found, which one or which command should I use to reduce the number of files, I know it is not identical however Electron uses the content_shell and the file structure is similar to of Chromium:
Electron file structure
Do I have to build it again? If so, which flags should I use?
Thanks everyone for your attention :-)
You need to set is_component_build = false when invoking gn to generate ninja build files.
This is because when is_component_build is set to true, the build will generate a shared object for each component target to improve compile time (faster incremental builds), whereas when set to false it will produce static libs for each component and bundle them into a huge shared object to speed up the application at runtime (among other reasons).
Even if you need to build it on Linux, it might be helpful to have a look at Checking out and Building Chromium for Windows # Faster builds and this answer.

hiera() function and YAML hash lookups

How do I rewrite this YAML so it is more structured, then reference it in Puppet using hiera function?
Currently, I am working with a hieradata syntax that looks very flat and hard to read.
service::proxy::behind_reverse_proxy: true
service::proxy::proxy_timeout: 300
service::proxy::serverlist:
- host1.fqdn
- host2.fqdn
And grabbed these in a params.pp file, for example
$behind_reverse_proxy = hiera('service::proxy::behind_reverse_proxy', 'False')
$serverlist = hiera('service::proxy::serverlist')
I thought I could rewrite the YAML like so in an effort to make it more readable...
service::proxy:
behind_reverse_proxy: true
proxy_timeout: 300
serverlist:
- host1.fqdn
- host2.fqdn
And updated the params.pp file according to
Hiera Key.subkey syntax
interacting with structured data
$behind_reverse_proxy = hiera('service::proxy.behind_reverse_proxy', 'False')
$serverlist = hiera('service::proxy.serverlist')
However upon puppet agent -t that resulted in
Error 400 on SERVER: Could not find data item service::proxy.serverlist in any Hiera data file and no default supplied
I think these are relevant
[user#server ~]$ facter -y | grep 'version'
facterversion: 2.4.4
puppetversion: 3.8.2
Following up on my comment about how you can access your restructured data:
service::proxy:
behind_reverse_proxy: true
proxy_timeout: 300
serverlist:
- host1.fqdn
- host2.fqdn
In your manifest, instead of this ...
$behind_reverse_proxy = hiera('service::proxy.behind_reverse_proxy', 'False')
$serverlist = hiera('service::proxy.serverlist')
... you might do this:
$proxy_info = merge(
{ 'behind_reverse_proxy' => false, 'serverlist' => [] },
hiera('service::proxy', {})
)
$behind_reverse_proxy = $proxy_info{'behind_reverse_proxy'}
$serverlist = $proxy_info{'serverlist'}
The merge() function is not built-in, but rather comes from Puppet's (formerly PuppetLabs's) widely-used stdlib module. There's a good chance that you are already using that module elsewhere, but even if not, it may be well worth your while to introduce it to your stack.
I've never used Hiera, but I think the problem is that you have a sequence (array) when you wanted a mapping (hash).
In the below YAML, the value of the service::proxy key is a sequence with three elements, each of which is a mapping with one key:
service::proxy:
- behind_reverse_proxy: true
- proxy_timeout: 300
- serverlist:
- host1.fqdn
- host2.fqdn
What you probably wanted, though, was for service::proxy to be a mapping with three keys:
service::proxy:
behind_reverse_proxy: true
proxy_timeout: 300
serverlist:
- host1.fqdn
- host2.fqdn
The examples in the Hiera docs you linked to seem to support this.

Why does ncl not find netcdf files?

I use ncl-ncarg 6.1.2-7 from Trusty under Ubuntu 14.04. I created a soft link from usr/share/ncarg to usr/lib and set the environment and path by:
export NCARG_ROOT="/usr"
export PATH=$NCARG_ROOT/bin:$PATH
I have a simple_plot_pr.ncl which create a panel plot from 3 netCDF files.
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
begin
;-- read data and set variable references
f1 = addfile ("home/robert/Dokumenty/climatological monthly mean pr_1971-2000.nc","r")
f2 = addfile ("home/robert/Dokumenty/climatological monthly mean pr_2021-2050.nc","r")
f3 = addfile ("home/robert/Dokumenty/climatological monthly mean pr_2071-2100.nc","r")
pr1 = f1->pr
pr2 = f2->pr
pr3 = f3->pr
;-- open a PNG file
wks = gsn_open_wks("png","panel_plot")
;-- create plot array
plot = new(3,graphic)
;-- set resources for contour plots
res = True
res#gsnMaximize = True
res#cnFillOn = True
res#tiMainString = "Climatological mean monthly precipitation amount"
gsn_define_colormap(wks,"rainbow")
plot(0) = gsn_csm_colormap(wks,pr1(:,:),res)
res#tiMainString = ""
plot(1) = gsn_csm_colormap(wks,pr2(:,:),res)
res#tiMainString = ""
plot(3) = gsn_csm_colormap(wks,pr3(:,:),res)
;-- create panel plot
gsn_panel(wks,plot,(/3,1/),False)
end
When I run this .ncl file I get the following error messages:
Copyright (C) 1995-2013 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 6.1.2
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.
fatal:["FileSupport.c":2761]:_NclFindFileExt: Requested file <home/Dokumenty/climatological monthly mean pr_1971-2000.nc> or <home/Dokumenty/climatological monthly mean pr_1971-2000> does not exist
fatal:["FileSupport.c":3106]:(home/Dokumenty/climatological monthly mean pr_1971-2000.nc) has no file extension, can't determine type of file to open
fatal:["FileSupport.c":2761]:_NclFindFileExt: Requested file <home/robert/Dokumenty/climatological monthly mean pr_2021-2050.nc> or <home/robert/Dokumenty/climatological monthly mean pr_2021-2050> does not exist
fatal:["FileSupport.c":3106]:(home/robert/Dokumenty/climatological monthly mean pr_2021-2050.nc) has no file extension, can't determine type of file to open
fatal:["FileSupport.c":2761]:_NclFindFileExt: Requested file <home/robert/Dokumenty/climatological monthly mean pr_2071-2100.nc> or <home/robert/Dokumenty/climatological monthly mean pr_2071-2100> does not exist
fatal:["FileSupport.c":3106]:(home/robert/Dokumenty/climatological monthly mean pr_2071-2100.nc) has no file extension, can't determine type of file to open
fatal:file (f1) isn't defined
fatal:["Execute.c":8128]:Execute: Error occurred at or near line 11 in file simple_plot_pr.ncl
I checked these files and they exist. I do not understand why ncl not find them? Can someone give me a suggestion to solve this issue?
The error is arising definitely due to the spaces in the file names. Please rename the filename without spaces.
You can also use the forward slash before the space in the file name. For example. Instead of writing "climatological monthly mean pr_1971-2000.nc"; you cane write the file names in the following format.
"climatological\ monthly\ mean\ pr_1971-2000.nc"

Perl Module Error - defined(%hash) is deprecated

Background:
I am working to migrate a Linux server to a newer one from Ubuntu 10.04 to 12.04
This server is responsible for executing several a number of Perl modules via crontabs.
These Perl Modules rely heavily on 30-40 perl extensions.
I have installed all Perl extensions and the crontabs are able to process successfully except for several Syntax errors caused by the newer versions of these Perl extensions.
I need some help with modifying the syntax to get the Perl script to process as intended.
Errors:
defined(%hash) is deprecated at pm/Alerts/Alerts.pm line 943.
(Maybe you should just omit the defined()?)
defined(%hash) is deprecated at pm/Alerts/Alerts.pm line 944.
(Maybe you should just omit the defined()?)
Code:
###
# Iterate the arrays deleting identical counts from each.
# If we found a mismatch then die.
# If either array is not empty when we are done then die
$logger->info('Comparing ' . (scalar keys %cms_rows) . ' CMS symbols to ' . (scalar keys %stats_rows) . ' STATS symbols');
foreach my $symbol ( keys %cms_rows ) {
my %cms_row = delete $cms_rows{$symbol};
my %stats_row = delete $stats_rows{$symbol};
##LINE 943## die("Error: NULL CMS counts for symbol '$symbol'") unless defined %cms_row;
##LINE 944## die("Error: NULL Stats counts for symbol '$symbol'") unless defined %stats_row;
my $cms_json = encode_json(\%cms_row);
my $stats_json = encode_json(\%stats_row);
$logger->debug("Comparing counts for '$symbol': CMS($cms_json), Stats($stats_json)");
die("Error: Up Counts Don't match for symbol '$symbol': CMS($cms_json), Stats($stats_json)") unless (!defined $cms_row{1} && !defined $stats_row{1}) || $cms_row{1} == $stats_row{1};
die("Error: Down Counts Don't match for symbol '$symbol': CMS($cms_json), Stats($stats_json)") unless (!defined $cms_row{-1} && !defined $stats_row{-1}) || $cms_row{-1} == $stats_row{-1};
}
###
Hopefully someone can help with this, any help is appreciated.
You must have upgraded from a seriously old version of Perl. The Perl 5.6.1 release notes say:
defined(%hash) is deprecated
(D) defined() is not usually useful on hashes because it checks for an
undefined scalar value. If you want to see if the hash is empty, just
use if (%hash) { # not empty } for example.
It was always a pretty stupid thing to do and Perl now warns you that you're doing something stupid. The warning is pretty clear about what you should do to fix this:
Maybe you should just omit the defined()?
So your lines would become:
die("Error: NULL CMS counts for symbol '$symbol'") unless %cms_row;
die("Error: NULL Stats counts for symbol '$symbol'") unless %stats_row;

Why read.clipboard is not working in R

Why is read.clipboard() not working on my system?
> library(psych)
> read.table(text=read.clipboard(), sep="\t", header=T, stringsAsFactors=F, strip.white=T)
Error in textConnection(text, encoding = "UTF-8") :
invalid 'text' argument
In addition: Warning message:
In read.table(file("clipboard"), header = TRUE, ...) :
incomplete final line found by readTableHeader on 'clipboard'
> read.table(text=readClipboard(), sep="\t", header=T, stringsAsFactors=F, strip.white=T)
Error in textConnection(text, encoding = "UTF-8") :
could not find function "readClipboard"
The version information:
> packageVersion('psych')
[1] ‘1.4.8.11’
> R.version
_
platform i486-pc-linux-gnu
arch i486
os linux-gnu
system i486, linux-gnu
status
major 3
minor 1.1
year 2014
month 07
day 10
svn rev 66115
language R
version.string R version 3.1.1 (2014-07-10)
nickname Sock it to Me
>
EDIT:
As suggested by #RichardScriven, I used following:
read.table('clipboard', sep="\t", header=T)
If I copy some cells in a spreadsheet and try above command, it does not work. Following is the error:
Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") : clipboard cannot be opened or contains no text
But if I paste first to a text editor, and copy it again from there, then the above command works well.
How can I directly use the data after copying from a spreadsheet?
Following command also shows same problem, works when copied from text editor but not when copied from spreadsheet. I produces same error.
> read.clipboard(sep="\t", header=T)
Error in open.connection(file, "rt") : cannot open the connection
In addition: Warning message:
In open.connection(file, "rt") :
clipboard cannot be opened or contains no text
read.clipboard(sep="\t",header = T)
The above code should work. Also please note that you need to copy [from excel / libreoffice etc] , go to R script and run the command in R. If you perform any other commands in between, this might not work. Hope this helps.

Resources