Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create hello_world.r in R language #31

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hellbrnger
Copy link

@hellbrnger hellbrnger commented Oct 3, 2024

User description

to print hello world in R


PR Type

documentation


Description

  • Added a new R script hello_world.r that prints "Hello World".
  • Included a comment to describe the script's functionality.

Changes walkthrough 📝

Relevant files
Documentation
hello_world.r
Add Hello World script in R                                                           

contributions/hello_world.r

  • Added a new R script to print "Hello World".
  • Included a comment explaining the purpose of the script.
  • +2/-0     

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    to print hello world
    @qodo-merge-pro qodo-merge-pro bot added documentation Improvements or additions to documentation Review effort [1-5]: 1 labels Oct 3, 2024
    Copy link

    qodo-merge-pro bot commented Oct 3, 2024

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Code Style
    The comment on line 1 has a typo and could be more descriptive.

    Copy link

    qodo-merge-pro bot commented Oct 3, 2024

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Score
    Enhancement
    Improve the clarity and correctness of the comment

    Improve the comment to be more descriptive and follow R style guidelines. Use a
    complete sentence and capitalize the first letter. Also, correct the spelling of
    "inorder" to "in order".

    contributions/hello_world.r [1]

    -# inorder to print hello world
    +# This script prints "Hello World" to the console.
    • Apply this suggestion
    Suggestion importance[1-10]: 8

    Why: The suggestion significantly improves the comment's clarity, correctness, and adherence to R style guidelines by using a complete sentence, correcting spelling, and capitalizing appropriately. This enhances the readability and professionalism of the code.

    8
    Best practice
    Use a more appropriate function for outputting text in R

    Consider using the cat() function instead of print() for outputting text in R. The
    cat() function is more commonly used for simple string output and provides more
    control over the output format.

    contributions/hello_world.r [2]

    -print("Hello World")
    +cat("Hello World\n")
    • Apply this suggestion
    Suggestion importance[1-10]: 7

    Why: The suggestion to use cat() instead of print() is valid as cat() is generally preferred for simple string outputs in R, providing better control over formatting. This change enhances the script's adherence to common R practices.

    7

    💡 Need additional feedback ? start a PR chat

    @handikatriarlan
    Copy link
    Owner

    please create a new folder where in your case you created the R folder before you put the hello world file

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    documentation Improvements or additions to documentation Review effort [1-5]: 1
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    2 participants