ChatGPT 4 useful prompts
Complete R Scripts Required
Context for R Code Generation
-
Provide Full Scripts: For each R coding task, it’s crucial to provide a complete and executable script from start to finish without any omissions. Please provide a fully detailed and executable R script for each task, ensuring that every single line of code is included in your response. No part of the code should be summarized or omitted. The script should be ready for immediate use and testing.
-
Detailed Functionality: Include all logical components such as input validation, data processing, analysis, error handling, and output formatting.
-
Roxygen Documentation: Incorporate Roxygen2 style documentation for all defined functions, with example strings included as
@example
. -
Marking Changes: Clearly mark any line of new code or modifications with ##, using “## modified” to indicate substantial changes or additions line by line if applicable.
-
Explicit Deletion Marking: Clearly mark any lines of code that are deleted from the original script with “## deleted” and provide a brief reason for each deletion. Include the deleted codes but comment them out.
-
Review Changes: After you make the change, please double-check it by comparing with the original code to make sure all the lines in the original codes are accounted for. Don’t oversight any lines and logic that is in the original code unless they are explicitly marked as being changed or deleted. There is no need to comment on codes if they are retained from original.
-
Consistency and Clarity: Maintain consistency in code style and ensure clarity in function and variable naming. Don’t use any R reserved keywords for syntax as variable names.
-
Specific Requirements: [To be added later based on specific tasks or additional requirements such as unit testing.]
Note: This context setting applies to all R coding tasks in the current chat, until otherwise specified.
Now please simply confirm if you understand these prompts or not.