<?xml version='1.0'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:atom="http://www.w3.org/2005/Atom" >
<channel>
	<title><![CDATA[BOL: Related items]]></title>
	<link>https://bioinformaticsonline.com/related/44648?offset=140</link>
	<atom:link href="https://bioinformaticsonline.com/related/44648?offset=140" rel="self" type="application/rss+xml" />
	<description><![CDATA[]]></description>
	
	<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/bookmarks/view/2457/rdataminingcom-r-and-data-mining</guid>
	<pubDate>Thu, 15 Aug 2013 18:37:23 -0500</pubDate>
	<link>https://bioinformaticsonline.com/bookmarks/view/2457/rdataminingcom-r-and-data-mining</link>
	<title><![CDATA[Rdatamining.com : R and Data Mining]]></title>
	<description><![CDATA[<p>This website presents examples, documents and resources on data mining with R. <br>Documents on using R for data mining are available to download for non-commercial personal use, including&nbsp;R Reference card for Data Mining, R and Data Mining: Examples and Case Studies and Time Series Analysis and Mining with R.</p><p>Address of the bookmark: <a href="http://www.rdatamining.com/" rel="nofollow">http://www.rdatamining.com/</a></p>]]></description>
	<dc:creator>Poonam Mahapatra</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/news/view/8848/upgrade-r-303</guid>
	<pubDate>Mon, 10 Mar 2014 11:23:51 -0500</pubDate>
	<link>https://bioinformaticsonline.com/news/view/8848/upgrade-r-303</link>
	<title><![CDATA[Upgrade R 3.0.3]]></title>
	<description><![CDATA[<p>R is a free software programming language and software environment for statistical computing and graphics. The R language is widely used among statisticians and data miners for developing statistical software and data analysis. Polls and surveys of data miners are showing R's popularity has increased substantially in recent years. Recently the new version of R codename &ldquo;Warm Puppy" have been released.<br /><br />You can download the latest version from here http://cran.rstudio.com/ . Or, if you are using Windows, you can upgrade to the latest version using the installr package http://cran.r-project.org/web/packages/installr/ . Simply run the following code:<br /><br /># installing/loading the package:<br />if(!require(installr)) { <br />install.packages("installr"); require(installr)} #load / install+load installr<br />&nbsp;<br />updateR()<br /><br />I try to keep the installr package updated and useful. If you have any suggestions or remarks on the package, you&rsquo;re invited to leave a comment below.<br /><br />If you use the global library system http://www.r-statistics.com/2010/04/changing-your-r-upgrading-strategy-and-the-r-code-to-do-it-on-windows/ , you can run the following in the new version of R:<br /><br />source("http://www.r-statistics.com/wp-content/uploads/2010/04/upgrading-R-on-windows.r.txt")<br />New.R.RunMe()</p><p>Reference:</p><p>http://www.r-statistics.com/2014/03/r-3-0-3-is-released/</p>]]></description>
	<dc:creator>Rahul Nayak</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/news/view/18738/surrogate-variable-analysis-sva</guid>
	<pubDate>Thu, 30 Oct 2014 08:01:58 -0500</pubDate>
	<link>https://bioinformaticsonline.com/news/view/18738/surrogate-variable-analysis-sva</link>
	<title><![CDATA[Surrogate Variable Analysis (SVA)]]></title>
	<description><![CDATA[<p>The sva package contains functions for removing batch effects and other unwanted variation in high-throughput experiment. Specifically, the sva package contains functions for the identifying and building surrogate variables for high-dimensional data sets. Surrogate variables are covariates constructed directly from high-dimensional data (like gene expression/RNA sequencing/methylation/brain imaging data) that can be used in subsequent analyses to adjust for unknown, unmodeled, or latent sources of noise. The sva package can be used to remove artifacts in three ways:</p><p>(1) identifying and estimating surrogate variables for unknown sources of variation in high-throughput experiments (Leek and Storey 2007 PLoS Genetics,2008 PNAS),</p><p>(2) directly removing known batch effects using ComBat (Johnson et al. 2007 Biostatistics) and</p><p>(3) removing batch effects with known control probes (Leek 2014 biorXiv).</p><p>Removing batch effects and using surrogate variables in differential expression analysis have been shown to reduce dependence, stabilize error rate estimates, and improve reproducibility, see (Leek and Storey 2007 PLoS Genetics, 2008 PNAS or Leek et al. 2011 Nat. Reviews Genetics).</p><p>More at http://www.bioconductor.org/packages/release/bioc/html/sva.html</p>]]></description>
	<dc:creator>Jit</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/news/view/21241/pacman</guid>
	<pubDate>Mon, 16 Feb 2015 12:15:17 -0600</pubDate>
	<link>https://bioinformaticsonline.com/news/view/21241/pacman</link>
	<title><![CDATA[Pacman]]></title>
	<description><![CDATA[<p><span>The pacman package is an R package management tool that combines the functionality of base library related functions into intuitively named functions. This package is ideally added to .Rprofile to increase workflow by reducing time recalling obscurely named functions, reducing code and integrating functionality of base functions to simultaneously perform multiple actions.<br /><br />Function names in the pacman package follow the format of p_xxx where &lsquo;xxx&rsquo; is the task the function performs. For instance the p_load function allows the user to load one or more packages as a more generic substitute for the library or require functions and if the package isn&rsquo;t available locally it will install it for you.<br /><br /></span></p><p><strong>Installation</strong></p><p><span>To download the development version of pacman:</span></p><p><span>Download the </span><a href="https://github.com/trinker/pacman/zipball/master">zip ball</a><span> or </span><a href="https://github.com/trinker/pacman/tarball/master">tar ball</a><span>, decompress and run </span><code>R CMD INSTALL</code><span> on it, or use th</span><span>e </span><strong>devtools</strong><span> package to install the development version:</span></p><pre title="">## Make sure your current packages are up to date
update.packages()
## devtools is required
devtools::install_github("trinker/pacman")
</pre><p>Note: Windows users need <a href="http://www.murdoch-sutherland.com/Rtools/">Rtools</a> and <a href="http://CRAN.R-project.org/package=devtools">devtools</a> to install this way.</p><p>More at https://github.com/trinker/pacman</p><p>&nbsp;</p>]]></description>
	<dc:creator>Rahul Nayak</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/pages/view/21443/a-guide-for-complete-r-beginners-getting-data-into-r</guid>
	<pubDate>Tue, 24 Feb 2015 20:15:08 -0600</pubDate>
	<link>https://bioinformaticsonline.com/pages/view/21443/a-guide-for-complete-r-beginners-getting-data-into-r</link>
	<title><![CDATA[A guide for complete R beginners :- Getting data into R]]></title>
	<description><![CDATA[<p>For a beginner this can be is the hardest part, it is also the most important to get right.</p><p>It is possible to create a vector by typing data directly into R using the combine function &lsquo;c&rsquo;</p><blockquote><p><strong>x </strong></p></blockquote><p>same as</p><blockquote><p><strong>x </strong></p></blockquote><p>creates the vector x with the numbers between 1 and 5.</p><p>You can see what is in an object at any time by typing its name;</p><blockquote><p><strong>x</strong></p></blockquote><p>will produce the output<strong> &lsquo;[1] 1 2 3 4 5&prime;</strong></p><p>Note that names need to be quoted</p><blockquote><p><strong>daysofweek </strong><strong>&larr; c(&lsquo;Monday&rsquo;, &lsquo;Tuesday&rsquo;, &lsquo;Wednesday&rsquo;, &lsquo;Thursday&rsquo;, &lsquo;Friday&rsquo;);</strong></p></blockquote><p>Usually however you want to input from a file. We have touched on the &lsquo;read.table&rsquo; function already.</p><blockquote><p><strong>mydata </strong></p></blockquote><p>Now <strong>mydata</strong> is a data frame with multiple vectors</p><p>each vector can be identified by the default syntax</p><p>#if any of these are typed it will print to screen</p><blockquote><p><strong>mydata$V1 mydata$V2 mydata$V3 </strong></p></blockquote><p>By default the function assumes certain things from the file</p><ul>
<li>The file is a plain text file (there are function to read excel files: <em>not covered here</em>)</li>
<li>columns are separated by any number of tabs or spaces</li>
<li>there is the same number of data points in each column</li>
<li>there is no header row (labels for the columns)</li>
<li>there is no column with names for the rows** [I&rsquo;ll explain].</li>
</ul><p><span style="text-decoration: underline;">If any of these are false, we need to tell that to the function</span></p><p>If it has a header column</p><blockquote><p><strong>mydata <em>header=T also works</em></strong></p></blockquote><p>Note that there is a comma between different parts of the functions arguments</p><p>If there is one less column in the header row, then R assumes that the 1<sup>st</sup> column of data after the header are the row names</p><p>Now the vectors (columns) are identified by their name</p><p>#if any of these are typed it will print to screen</p><blockquote><p><strong>mydata$A mydata$B mydata$C </strong></p></blockquote><p># Summary about the whole data frame</p><blockquote><p><strong>summary(mydata)</strong></p></blockquote><p># Summary information of column A</p><blockquote><p><strong>summary(mydata$A) </strong></p></blockquote><p>We can shortcut having to type the data frame each time by attaching it</p><blockquote><p><strong>attach(mydata)</strong></p></blockquote><p># summary of column B as &lsquo;mydata&rsquo; is attached</p><blockquote><p><strong>summary(B)</strong></p></blockquote><p><span style="text-decoration: underline;">Two other important options for </span><em><span style="text-decoration: underline;">read.table</span></em></p><p>If is is separated only by tabs and has a header</p><blockquote><p><strong>mydata </strong></p></blockquote><p>Really useful if you have spaces in the contents of some columns, so R does not mess up reading the columns . However if the columns or of an uneven length it will tell you.</p><p>If you know that the file has uneven columns</p><blockquote><p><strong>mydata </strong></p></blockquote><p>This causes R to fill empty spaces in a columns with &lsquo;NA&rsquo; .</p><p>The last two examples will still work with our file and give the same result as with only headers=T</p><p><span style="text-decoration: underline;">Graphs</span></p><p>to get an idea of what R is capable of type</p><blockquote><p><strong>demo(graphics)</strong></p></blockquote><p>steps through the examples, and the code is printed to the screen</p><p>We will work with simpler examples that have immediate use to biologists.</p><p>Remember to get more information about the options to a function type &lsquo;?function&rsquo;</p><p><span style="text-decoration: underline;">Histogram of A</span><span style="text-decoration: underline;"></span></p><blockquote><p><strong>hist(mydata$A)</strong></p></blockquote><p>If there was more data we could increase the number of vertical columns with the option, breaks=50 (or another relevant number).</p><blockquote><p><strong>boxplot(mydata)</strong></p></blockquote><p>We can get rid of the need to type the data frame each time by using the <strong>attach</strong> function</p><p># if not already done so</p><blockquote><p><strong>attach(mydata) </strong></p><p><strong>boxplot(mydata$A, mydata$B, name=c(&ldquo;Value A&rdquo;, &ldquo;Value B&rdquo;) , ylab=&ldquo;Count of Something&rdquo;)</strong></p></blockquote><p>same as</p><blockquote><p><strong>boxplot(A, B, name=c(&ldquo;Value A&rdquo;, &ldquo;Value B&rdquo;) , ylab=&ldquo;Count of Something&rdquo;)</strong></p></blockquote><p><span style="text-decoration: underline;">Scatter plot</span></p><p># if not already done so</p><blockquote><p><strong>attach(mydata) </strong></p><p><strong>plot(A,B) # or plot(mydata$A, mydata$B)</strong></p></blockquote><p><strong><span style="text-decoration: underline;">SAVING an image</span></strong></p><p>Windows users (Rgui) RIGHT click on image and select which you want.</p><p><span style="text-decoration: underline;">These instructions work for everyone.</span></p><p>You need to create a new device of the type of file you need, then send the data to that device</p><p>to save as a png file (easy to load into the likes of powerpoint, also great for web applications.</p><blockquote><p><strong>png(&lsquo;filename&rsquo;) </strong></p><p><strong>boxplot(A, B, name=c(&ldquo;Value A&rdquo;, &ldquo;Value B&rdquo;) , ylab=&ldquo;Count of Something&rdquo;)</strong></p></blockquote><p>or to save as a pdf</p><blockquote><p><strong>pdf(&lsquo;filename&rsquo;) </strong></p><p><strong>boxplot(A, B, name=c(&ldquo;Value A&rdquo;, &ldquo;Value B&rdquo;) , ylab=&ldquo;Count of Something&rdquo;)</strong></p></blockquote><p><span style="text-decoration: underline;">Note</span></p><ul>
<li>Nothing will appear on screen, the output is going to the file</li>
<li>Also it may not be saved immediately but will once the device (or R) is turned quit.</li>
</ul><p>To quit R type</p><p><strong>q() # </strong>If you save your session, next time you start R, you will have your data preloaded.</p><p>Or if you want to remain in R</p><blockquote><pre><strong>dev.off() #</strong>turns of the png (or pdf etc) device, thus forces the data to save</pre></blockquote>]]></description>
	<dc:creator>Archana Malhotra</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/bookmarks/view/22961/bioscripts</guid>
	<pubDate>Sun, 28 Jun 2015 07:46:14 -0500</pubDate>
	<link>https://bioinformaticsonline.com/bookmarks/view/22961/bioscripts</link>
	<title><![CDATA[BioScripts]]></title>
	<description><![CDATA[<p>You are requested to please bookmark collection of bioinformatics tools, scripts, codes that can be pieced together in a very easy and flexible manner to perform both simple and complex bioinformatics tasks.</p>
<p>The next-generation sequencing included whole genome sequencing(WGS), transcriptome sequencing (whole cDNA sequencing, RNA-seq), digital gene expression sequencing (Tag-Seq), ChIP-Seq, and so on. And there are many sequencing platform to generate sequece, as well know Sanger/ABi(the frist generation), Solexa/illumina, SOLiD/ABi, 454/Roche. But thier sequence format is different, also they have different error type. High quality data is very important for further analysis or data mining. There are many pipeline for raw sequence quality analysis and control with few of process for reporting reads quality statistical details, trimming, filtering, and error correction. Please bookmarks them for the benefits of bioinformatics community.</p>
<p>https://code.google.com/p/biowiki/</p>
<p>https://code.google.com/p/ngs-pipeline/source/browse/#svn%2Ftrunk</p>
<p>NGSand Perl scripts https://code.google.com/hosting/search?q=NGS+perl&amp;projectsearch=Search+projects</p>
<p>NGS and Python scripts https://code.google.com/hosting/search?q=NGS+Python&amp;projectsearch=Search+projects</p><p>Address of the bookmark: <a href="https://code.google.com/hosting/search?q=bioinformatics&amp;sa=Search" rel="nofollow">https://code.google.com/hosting/search?q=bioinformatics&amp;sa=Search</a></p>]]></description>
	<dc:creator>Rahul Nayak</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/bookmarks/view/27850/clusterprofiler</guid>
	<pubDate>Thu, 16 Jun 2016 18:57:03 -0500</pubDate>
	<link>https://bioinformaticsonline.com/bookmarks/view/27850/clusterprofiler</link>
	<title><![CDATA[clusterProfiler]]></title>
	<description><![CDATA[<p>statistical analysis and visulization of functional profiles for genes and gene clusters<br><br>Bioconductor version: Release (3.3)<br><br>This package implements methods to analyze and visualize functional profiles (GO and KEGG) of gene and gene clusters.<br><br>Author: Guangchuang Yu &lt;guangchuangyu at gmail.com&gt; with contributions from Li-Gen Wang and Giovanni Dall'Olio.<br><br>Maintainer: Guangchuang Yu &lt;guangchuangyu at gmail.com&gt;<br><br>Citation (from within R, enter citation("clusterProfiler")):<br><br>Yu G, Wang L, Han Y and He Q (2012). &ldquo;clusterProfiler: an R package for comparing biological themes among gene clusters.&rdquo; OMICS: A Journal of Integrative Biology, 16(5), pp. 284-287.<br>Installation<br><br>To install this package, start R and enter:<br><br>## try http:// if https:// URLs are not supported<br>source("https://bioconductor.org/biocLite.R")<br>biocLite("clusterProfiler")</p>
<p>https://www.bioconductor.org/packages/devel/bioc/vignettes/clusterProfiler/inst/doc/clusterProfiler.html</p><p>Address of the bookmark: <a href="https://www.bioconductor.org/packages/devel/bioc/vignettes/clusterProfiler/inst/doc/clusterProfiler.html" rel="nofollow">https://www.bioconductor.org/packages/devel/bioc/vignettes/clusterProfiler/inst/doc/clusterProfiler.html</a></p>]]></description>
	<dc:creator>Jit</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/bookmarks/view/29487/shinyheatmap</guid>
	<pubDate>Fri, 21 Oct 2016 05:12:11 -0500</pubDate>
	<link>https://bioinformaticsonline.com/bookmarks/view/29487/shinyheatmap</link>
	<title><![CDATA[Shinyheatmap]]></title>
	<description><![CDATA[<p><span>Background: Transcriptomics, metabolomics, metagenomics, and other various next-generation sequencing (-omics) fields are known for their production of large datasets. Visualizing such big data has posed technical challenges in biology, both in terms of available computational resources as well as programming acumen. Since heatmaps are used to depict high-dimensional numerical data as a colored grid of cells, efficiency and speed have often proven to be critical considerations in the process of successfully converting data into graphics. For example, rendering interactive heatmaps from large input datasets (e.g., 100k+ rows) has been computationally infeasible on both desktop computers and web browsers. In addition to memory requirements, programming skills and knowledge have frequently been barriers-to-entry for creating highly customizable heatmaps. Results: We propose shinyheatmap: an advanced user-friendly heatmap software suite capable of efficiently creating highly customizable static and interactive biological heatmaps in a web browser. shinyheatmap is a low memory footprint program, making it particularly well-suited for the interactive visualization of extremely large datasets that cannot typically be computed in-memory due to size restrictions. Conclusions: shinyheatmap is hosted online as a freely available web server with an intuitive graphical user interface: http://shinyheatmap.com. The methods are implemented in R, and are available as part of the shinyheatmap project at: https://github.com/Bohdan-Khomtchouk/shinyheatmap.</span></p>
<p><span>More at&nbsp;http://biorxiv.org/content/early/2016/09/21/076463&nbsp;</span></p><p>Address of the bookmark: <a href="http://shinyheatmap.com/" rel="nofollow">http://shinyheatmap.com/</a></p>]]></description>
	<dc:creator>Jit</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/bookmarks/view/30901/ideoplot</guid>
	<pubDate>Mon, 13 Feb 2017 09:47:32 -0600</pubDate>
	<link>https://bioinformaticsonline.com/bookmarks/view/30901/ideoplot</link>
	<title><![CDATA[Ideoplot]]></title>
	<description><![CDATA[<p>Simple ideogram plotting and annotation in R.</p>
<p>Basic usage:</p>
<p>Rscript Ideoplot.R --heatmap hm.bed --annotate annotations.bed --out ideogram.pdf<br> -or-<br> Rscript Ideoplot.R --annotate annotations.bed</p>
<pre>Options
  --ideobed, i      A bed file of reference contig lengths/chromosome names
  --heatmap, -h     Fill chromosomes with normalized heatmap
                   (described below)
  --annotate, -a    Add character annotations.
  --out, -o         PDF output name.
  --stripes, -s     Specify a file containing the layout of the
                    annotations (description below)
  --bars, -b        Add track annotations
  --reference, -f   Either hg19, or hg38
  --topdown, r      Flag, when set, flips the orientation (P arms
                    drawn on top).
</pre><p>Address of the bookmark: <a href="https://github.com/mchaisso/Ideoplot" rel="nofollow">https://github.com/mchaisso/Ideoplot</a></p>]]></description>
	<dc:creator>Shruti Paniwala</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/pages/view/33869/import-r-data</guid>
	<pubDate>Wed, 12 Jul 2017 08:30:46 -0500</pubDate>
	<link>https://bioinformaticsonline.com/pages/view/33869/import-r-data</link>
	<title><![CDATA[Import R Data]]></title>
	<description><![CDATA[<p>It is often necessary to import sample textbook data into R before you start working on your homework.</p><div id="node-69"><div><p><strong>Excel File</strong></p><p>Quite frequently, the sample data is in&nbsp;<span>Excel&nbsp;</span>format, and needs to be imported into R prior to use. For this, we can use the function&nbsp;<span>read.xls&nbsp;</span>from the&nbsp;<span>gdata&nbsp;</span>package. It reads from an Excel spreadsheet and returns a&nbsp;<a href="http://www.r-tutor.com/r-introduction/data-frame">data frame</a>. The following shows how to load an Excel spreadsheet named&nbsp;<span>"mydata.xls"</span>. This method requires Perl runtime to be present in the system.</p><blockquote><div id="listing-68"><span><a></a></span>&gt;&nbsp;library(gdata)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;load&nbsp;gdata&nbsp;package&nbsp;<br /><span><a></a></span>&gt;&nbsp;help(read.xls)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;documentation&nbsp;<br /><span><a></a></span>&gt;&nbsp;mydata&nbsp;=&nbsp;read.xls("mydata.xls")&nbsp;&nbsp;#&nbsp;read&nbsp;from&nbsp;first&nbsp;sheet</div></blockquote><p>Alternatively, we can use the function&nbsp;<span>loadWorkbook&nbsp;</span>from the&nbsp;<span>XLConnect&nbsp;</span>package to read the entire workbook, and then load the worksheets with&nbsp;<span>readWorksheet</span>. The&nbsp;<span>XLConnect&nbsp;</span>package requires Java to be pre-installed.</p><blockquote><div id="listing-69"><span><a></a></span>&gt;&nbsp;library(XLConnect)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;load&nbsp;XLConnect&nbsp;package&nbsp;<br /><span><a></a></span>&gt;&nbsp;wk&nbsp;=&nbsp;loadWorkbook("mydata.xls")&nbsp;<br /><span><a></a></span>&gt;&nbsp;df&nbsp;=&nbsp;readWorksheet(wk,&nbsp;sheet="Sheet1")</div></blockquote><p>&nbsp;</p><h4><a></a>Minitab File</h4><p>If the data file is in&nbsp;<span>Minitab Portable Worksheet&nbsp;</span>format, it can be opened with the function&nbsp;<span>read.mtp&nbsp;</span>from the&nbsp;<span>foreign&nbsp;</span>package. It returns a&nbsp;<a href="http://www.r-tutor.com/r-introduction/list">list</a>&nbsp;of components in the Minitab worksheet.</p><blockquote><div id="listing-70"><span><a></a></span>&gt;&nbsp;library(foreign)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;load&nbsp;the&nbsp;foreign&nbsp;package&nbsp;<br /><span><a></a></span>&gt;&nbsp;help(read.mtp)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;documentation&nbsp;<br /><span><a></a></span>&gt;&nbsp;mydata&nbsp;=&nbsp;read.mtp("mydata.mtp")&nbsp;&nbsp;#&nbsp;read&nbsp;from&nbsp;.mtp&nbsp;file</div></blockquote><p>&nbsp;</p><h4><a></a>SPSS File</h4><p>For the data files in&nbsp;<span>SPSS&nbsp;</span>format, it can be opened with the function&nbsp;<span>read.spss&nbsp;</span>also from the&nbsp;<span>foreign&nbsp;</span>package. There is a&nbsp;<span>"to.data.frame"&nbsp;</span>option for choosing whether a data frame is to be returned. By default, it returns a list of components instead.</p><blockquote><div id="listing-71"><span><a></a></span>&gt;&nbsp;library(foreign)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;load&nbsp;the&nbsp;foreign&nbsp;package&nbsp;<br /><span><a></a></span>&gt;&nbsp;help(read.spss)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;documentation&nbsp;<br /><span><a></a></span>&gt;&nbsp;mydata&nbsp;=&nbsp;read.spss("myfile",&nbsp;to.data.frame=TRUE)</div></blockquote><p>&nbsp;</p><h4><a></a>Table File</h4><p>A data table can resides in a text file. The cells inside the table are separated by blank characters. Here is an example of a table with 4 rows and 3 columns.</p><blockquote><div id="listing-72"><span><a></a></span>100&nbsp;&nbsp;&nbsp;a1&nbsp;&nbsp;&nbsp;b1&nbsp;<br /><span><a></a></span>200&nbsp;&nbsp;&nbsp;a2&nbsp;&nbsp;&nbsp;b2&nbsp;<br /><span><a></a></span>300&nbsp;&nbsp;&nbsp;a3&nbsp;&nbsp;&nbsp;b3&nbsp;<br /><span><a></a></span>400&nbsp;&nbsp;&nbsp;a4&nbsp;&nbsp;&nbsp;b4</div></blockquote><p>Now copy and paste the table above in a file named&nbsp;<span>"mydata.txt"&nbsp;</span>with a text editor. Then load the data into the workspace with the function&nbsp;<span>read.table</span>.</p><blockquote><div id="listing-73"><span><a></a></span>&gt;&nbsp;mydata&nbsp;=&nbsp;read.table("mydata.txt")&nbsp;&nbsp;#&nbsp;read&nbsp;text&nbsp;file&nbsp;<br /><span><a></a></span>&gt;&nbsp;mydata&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;print&nbsp;data&nbsp;frame&nbsp;<br /><span><a></a></span>&nbsp;&nbsp;&nbsp;V1&nbsp;V2&nbsp;V3&nbsp;<br /><span><a></a></span>1&nbsp;100&nbsp;a1&nbsp;b1&nbsp;<br /><span><a></a></span>2&nbsp;200&nbsp;a2&nbsp;b2&nbsp;<br /><span><a></a></span>3&nbsp;300&nbsp;a3&nbsp;b3&nbsp;<br /><span><a></a></span>4&nbsp;400&nbsp;a4&nbsp;b4</div></blockquote><p>For further detail of the function&nbsp;<span>read.table</span>, please consult the R documentation.</p><blockquote><div id="listing-74"><span><a></a></span>&gt;&nbsp;help(read.table)</div></blockquote><p>&nbsp;</p><h4><a></a>CSV File</h4><p>The sample data can also be in&nbsp;<span>comma separated values&nbsp;</span>(CSV) format. Each cell inside such data file is separated by a special character, which usually is a comma, although other characters can be used as well.</p><p>The first row of the data file should contain the column names instead of the actual data. Here is a sample of the expected format.</p><blockquote><div id="listing-75"><span><a></a></span>Col1,Col2,Col3&nbsp;<br /><span><a></a></span>100,a1,b1&nbsp;<br /><span><a></a></span>200,a2,b2&nbsp;<br /><span><a></a></span>300,a3,b3</div></blockquote><p>After we copy and paste the data above in a file named&nbsp;<span>"mydata.csv"&nbsp;</span>with a text editor, we can read the data with the function&nbsp;<span>read.csv</span>.</p><blockquote><div id="listing-76"><span><a></a></span>&gt;&nbsp;mydata&nbsp;=&nbsp;read.csv("mydata.csv")&nbsp;&nbsp;#&nbsp;read&nbsp;csv&nbsp;file&nbsp;<br /><span><a></a></span>&gt;&nbsp;mydata&nbsp;<br /><span><a></a></span>&nbsp;&nbsp;Col1&nbsp;Col2&nbsp;Col3&nbsp;<br /><span><a></a></span>1&nbsp;&nbsp;100&nbsp;&nbsp;&nbsp;a1&nbsp;&nbsp;&nbsp;b1&nbsp;<br /><span><a></a></span>2&nbsp;&nbsp;200&nbsp;&nbsp;&nbsp;a2&nbsp;&nbsp;&nbsp;b2&nbsp;<br /><span><a></a></span>3&nbsp;&nbsp;300&nbsp;&nbsp;&nbsp;a3&nbsp;&nbsp;&nbsp;b3</div></blockquote><p>In various European locales, as the comma character serves as the decimal point, the function&nbsp;<span>read.csv2&nbsp;</span>should be used instead. For further detail of the&nbsp;<span>read.csv&nbsp;</span>and&nbsp;<span>read.csv2&nbsp;</span>functions, please consult the R documentation.</p><blockquote><div id="listing-77"><span><a></a></span>&gt;&nbsp;help(read.csv)</div></blockquote><p>&nbsp;</p><h4><a></a>Working Directory</h4><p>Finally, the code samples above assume the data files are located in the R&nbsp;<span>working</span>&nbsp;<span>directory</span>, which can be found with the function&nbsp;<span>getwd</span>.</p><blockquote><div id="listing-78"><span><a></a></span>&gt;&nbsp;getwd()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;get&nbsp;current&nbsp;working&nbsp;directory</div></blockquote><p>You can select a different working directory with the function&nbsp;<span>setwd()</span>, and thus avoid entering the full path of the data files.</p><blockquote><div id="listing-79"><span><a></a></span>&gt;&nbsp;setwd("")&nbsp;&nbsp;&nbsp;#&nbsp;set&nbsp;working&nbsp;directory</div></blockquote><p>Note that the forward slash should be used as the path separator even on Windows platform.</p><blockquote><div id="listing-80"><span><a></a></span>&gt;&nbsp;setwd("C:/MyDoc")</div></blockquote></div></div>]]></description>
	<dc:creator>Abhimanyu Singh</dc:creator>
</item>

</channel>
</rss>