Nitin Agrawal
Contact -
  • Home
  • Interviews
    • Secret Receipe
    • InterviewFacts
    • Resume Thoughts
    • Daily Coding Problems
    • BigShyft
    • Companies
    • Interviews Theory
  • Programming Languages
    • Java Script >
      • Tutorials
      • Code Snippets
    • Reactive Programming >
      • Code Snippets
    • R
    • DataStructures >
      • LeetCode Problems >
        • Problem10
        • Problem300
      • AnagramsSet
    • Core Java >
      • Codility
      • Program Arguments OR VM arguments & Environment variables
      • Java Releases >
        • Java8 >
          • Performance
          • NasHorn
          • WordCount
          • Thoughts
        • Java9 >
          • ServiceLoaders
          • Lambdas
          • List Of Objects
          • Code Snippets
        • Java14 >
          • Teeing
          • Pattern
          • Semaphores
        • Java17 >
          • Switches
          • FunctionalStreams
          • Predicate
          • Consumer_Supplier
          • Collectors in Java
        • Java21 >
          • Un-named Class
          • Virtual Threads
          • Structured Concurrency
      • Threading >
        • ThreadsOrder
        • ProducerConsumer
        • Finalizer
        • RaceCondition
        • Executors
        • Future Or CompletableFuture
      • Important Points
      • Immutability
      • Dictionary
      • Sample Code Part 1 >
        • PatternLength
        • Serialization >
          • Kryo2
          • JAXB/XSD
          • XStream
        • MongoDB
        • Strings >
          • Reverse the String
          • Reverse the String in n/2 complexity
          • StringEditor
          • Reversing String
          • String Puzzle
          • Knuth Morris Pratt
          • Unique characters
          • Top N most occurring characters
          • Longest Common Subsequence
          • Longest Common Substring
        • New methods in Collections
        • MethodReferences
        • Complex Objects Comparator >
          • Performance
        • NIO >
          • NIO 2nd Sample
        • Date Converter
        • Minimum cost path
        • Find File
      • URL Validator
    • Julia
    • Python >
      • Decorators
      • String Formatting
      • Generators_Threads
      • JustLikeThat
    • Go >
      • Tutorial
      • CodeSnippet
      • Go Routine_Channel
      • Suggestions
    • Methodologies & Design Patterns >
      • Design Principles
      • Design Patterns >
        • TemplatePattern
        • Adapter Design Pattern
        • Proxy
        • Lazy Initialization
        • CombinatorPattern
        • Singleton >
          • Singletons
        • Strategy
  • Frameworks
    • Apache Velocity
    • React Library >
      • Tutorial
    • Spring >
      • Spring Boot >
        • CustomProperties
        • ExceptionHandling
        • Custom Beans
        • Issues
      • Quick View
    • Rest WebServices >
      • Interviews
      • Swagger
    • Cloudera BigData >
      • Ques_Ans
      • Hive
      • Apache Spark >
        • ApacheSpark Installation
        • SparkCode
        • Sample1
        • DataFrames
        • RDDs
        • SparkStreaming
        • SparkFiles
    • Integration >
      • Apache Camel
    • Testing Frameworks >
      • JUnit >
        • JUnit Runners
      • EasyMock
      • Mockito >
        • Page 2
      • TestNG
    • Blockchain >
      • Ethereum Smart Contract
      • Blockchain Java Example
    • Microservices >
      • Messaging Formats
      • Design Patterns
    • AWS >
      • Honeycode
    • Dockers >
      • GitBash
      • Issues
      • Kubernetes
  • Databases
    • MySql
    • Oracle >
      • Interview1
      • SQL Queries
    • Elastic Search
  • Random issues
    • TOAD issue
    • Architect's suggestions
  • Your Views

R language

3/24/2018

0 Comments

 
I have attached the document for R below which I have seen to get the idea about R & also have added a few comments of mine in the same document which may be helpful.
​Also I will be using this space to share a thing or two about what I see in R during my time with R which may again help you.
​To work on R language will suggest you to download the GUI for this. It will provide you the console & you can clean that console using Ctrl+L
​Indexes are not 0 based here in R, index starts from 1.

​I have attached the pdf which I tried to study about R language. I am not much impressed by R as given in this PDF.
​One can create impressive charts & diagrams using other APIs but what is special in R otherwise I don't know, popularity of R also seems to me some political or business agenda. People propagates such technologies/languages just to make extra money otherwise I don't know why one needs to learn so many languages/technologies. Rest you are also logical :)
=======================================================================
​Add a list of numbers to a variable & then sort its contents.
> a <- List(1,5,3,4,2)
> factor(a, sort(a))
[1] 1 5 3 4 2
Levels: 1 2 3 4 5
Basically, use above factor() to get other features else can use sort() directly shown below.
> a <- c("Nitin","Ali","Chandan","Babita")
> sort(a)

[1] "Ali"     "Babita"  "Chandan" "Nitin" 

List of different objects can be created like -
> s <- list(c(1,2), fac, M, a)
> s
[[1]]
[1] 1 2
[[2]]
[1] 1  10
Levels: 1 10
[[3]]
[1] 10 35
[[4]]
[1] <NA> <NA> <NA>
Levels: 21 22 23

=======================================================================
​To list the variables currently active in your workspace -

> ls()
It will give the output like -
[1] "a"      "fac"    "fac2"   "ls"     "M"      "mat"    "myData" "names"  "v"      "vtr"    "vtr1"   "vtr2"   "x"      "y"      "z" 

​& if you want to remove some variable from this list -
>remove(a)
​It will remove variable 'a' from the above list.

​
r_language.pdf
File Size: 568 kb
File Type: pdf
Download File

0 Comments
Powered by Create your own unique website with customizable templates.