commandline session > dfrm print(dfrm dfrm > print(dfrm) V1 V2 1 Name Jeffrin 2 Age 35 3 Sex Male > dfrm print(dfrm) V1 1 Name-Jeffrin 2 Age-35 3 Sex-Male > dfrm print(dfrm) V1 1 Name-Jeffrin 2 Age-35 3 Sex-Male > class(dfrm$V1) [1] “factor” > class(dfrm$V1) [1] “factor” > class(dfrm$V2) [1] “NULL” > class(dfrm$V3) [1] “NULL” …
Monthly Archives: June 2012
R – package installation
Get The Hang > install.packages(c(“Rpad”)) Installing package(s) into ‘/usr/local/lib/R/site-library’ (as ‘lib’ is unspecified) — Please select a CRAN mirror for use in this session — Loading Tcl/Tk interface … done trying URL ‘http://ftp.iitm.ac.in/cran/src/contrib/Rpad_1.3.0.tar.gz’ Content type ‘application/x-gzip’ length 1745840 bytes (1.7 Mb) opened URL ================================================== downloaded 1.7 Mb * installing *source* package ‘Rpad’ … ** package …
R "version" through web related.
Get The Hang $ 4.2.20 4 504—> cat ntest.R cat(“n”) for(i in 1:length(version)) { print(version[i]) cat(“”) } cat(“n”) $ 4.2.20 5 505—>
R – reading tabular files
commandline session > test print(test) V1 V2 1 Name Jeffrin 2 Age 35 3 Sex Male > version _ platform x86_64-pc-linux-gnu arch x86_64 os linux-gnu system x86_64, linux-gnu status major 2 minor 15.1 year 2012 month 06 day 22 svn rev 59600 language R version.string R version 2.15.1 (2012-06-22) nickname Roasted Marshmallows > Save workspace …
R – loading libraries and data related
Get The Hang > library(ggplot2) Error in library(ggplot2) : there is no package called ‘ggplot2’ > library(ggplot2) Loading required package: reshape Loading required package: plyr Attaching package: ‘reshape’ The following object(s) are masked from ‘package:plyr’: rename, round_any Loading required package: grid Loading required package: proto >
find – regex for listing ugly file names
$ 4.2.20 27 525—> find . -regex ‘.*[^-_./0-9a-zA-Z ].’ ./xfonts-utils-7.6+1 ./.wine/dosdevices/d:: ./url?sa=t ./.java/.userPrefs/_!’:!bw”t!#4!}@”w!(@!}@”u!’%!.g”k!’)!.g”p!’@!~@!t!’k!~!== ./Calibre Library/Jonas Mari[PleaseinsertPrerenderUnicode{A__}intopreamble]n $ 4.2.20 28 526—>
libata error [debug]
https://ata.wiki.kernel.org/index.php/Libata_error_messages
sed – stream editor for filtering and transforming text
commandline session $ 4.2.20 36 535—> cat tiles.txt 1. width 2 meters and 15 centimeters height 1 meters and 50 centimeters area = 2.15 * 1.50 = 3.225 square meter 2. width 2 meters and 15 centimeters height 43 centimeters area = .9245 square meter Sum = 4.1495 square meter. 1 tile = .1350 square …
Continue reading “sed – stream editor for filtering and transforming text”
coproc is a shell keyword related to coprocesses in GNU Bash
ABOUT coproc Bash 4.0 introduced coprocesses, a feature certainly familiar to ksh users. The coproc keyword starts a command as a background job, setting up pipes connected to both its stdin and stdout so that you can interact with it bidirectionally. Optionally, the co-process can have a name NAME. If NAME is given, the command …
Continue reading “coproc is a shell keyword related to coprocesses in GNU Bash”
accident in experiments : ls !a and ls ?a
accident in experiments $ 4.2.20 8 507—> cat .bashrc #export PS1=”[ 33[0;31m] $ V # ! ” export PS1=”$ V # !—> ” shellp() { pre=: post=: printf “$pre%s$postn” “$@” } $ 4.2.20 9 508—> shopt -u extglob accident fixme $ 4.2.20 10 509—> ls ?a NetworkSystemAdministration.pdf $ 4.2.20 26 525—> pwd /home/jeffrin $ 4.2.20 …
Continue reading “accident in experiments : ls !a and ls ?a”