{"id":23468208,"url":"https://github.com/camilajaviera91/r-1st-approach","last_synced_at":"2025-04-12T20:58:28.828Z","repository":{"id":267884567,"uuid":"902641517","full_name":"CamilaJaviera91/R-1st-approach","owner":"CamilaJaviera91","description":"This R script is designed to collect user information (name, age, and city), store it in a structured format, and save it as a CSV file. The script ensures data validation and provides a user-friendly interface for entering records.","archived":false,"fork":false,"pushed_at":"2025-01-03T15:38:49.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T20:58:26.584Z","etag":null,"topics":["csv","r"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CamilaJaviera91.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-13T01:16:44.000Z","updated_at":"2025-02-17T21:11:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"b725ff99-e906-4a8f-af8a-17b0206a10ae","html_url":"https://github.com/CamilaJaviera91/R-1st-approach","commit_stats":null,"previous_names":["camilajaviera91/r-1st-approach"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CamilaJaviera91%2FR-1st-approach","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CamilaJaviera91%2FR-1st-approach/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CamilaJaviera91%2FR-1st-approach/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CamilaJaviera91%2FR-1st-approach/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CamilaJaviera91","download_url":"https://codeload.github.com/CamilaJaviera91/R-1st-approach/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248631703,"owners_count":21136561,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csv","r"],"created_at":"2024-12-24T13:38:57.980Z","updated_at":"2025-04-12T20:58:28.808Z","avatar_url":"https://github.com/CamilaJaviera91.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# User Data Collection Script in R\n\nThis R script is designed to collect user information (name, age, and city), store it in a structured format, and save it as a CSV file. The script ensures data validation and provides a user-friendly interface for entering records.\n\n## Features\n\n- **Dynamic Folder Creation**: The script creates a specified folder (`./R-1st-approach/output_data`) if it does not already exist.\n- **Data Collection Loop**: Continuously collects user records until the user chooses to stop.\n- **Input Validation**: Ensures that the age entered is a numeric value.\n- **CSV File Generation**: Saves the collected data into a CSV file (`user_data.csv`) within the specified folder.\n\n## Prerequisites\n\n- R installed on your system.\n- No additional libraries are required; the script uses base R functions.\n\n## How to Use\n\n1. **Run the Script**:\n   Execute the script in your R environment.\n\n2. **Input Data**:\n   - Enter your **name** when prompted.\n   - Enter your **age** (numeric only; invalid inputs will be rejected).\n   - Enter your **city**.\n   - Decide whether to add another record by typing `y` (yes) or `n` (no).\n\n3. **View Results**:\n   - After exiting the input loop, the script displays the collected data in the console.\n\n4. **File Generation**:\n   - The data is saved as a CSV file in the `./R-1st-approach/output_data` folder.\n\n## File Structure\n\n- **`output_data` Folder**:\n  - Contains the generated `user_data.csv` file with the collected data.\n\n## Example Output\n\n### Sample Input:\n\n``` \nEnter your name: Alice Enter your age (numeric): 30 \n```\n``` \nEnter your city: New York Do you want to add another record? (y/n): y\n``` \n``` \nEnter your name: Bob Enter your age (numeric): 25 \n``` \n``` \nEnter your city: San Francisco Do you want to add another record? (y/n): n\n``` \n\n### Sample Data in Console\n### Generated CSV File:\n\n`user_data.csv` will contain:\n| Name  | Age | City          |\n|-------|-----|---------------|\n| Alice | 30  | New York      |\n| Bob   | 25  | San Francisco |\n\n## Notes\n\n- Ensure the script has write permissions for the folder where the output file will be created.\n- The script gracefully handles non-numeric inputs for age, prompting the user until a valid value is provided.\n\n## Contact\n\nFor questions or suggestions, feel free to reach out!\n\n---\n\nHappy coding! 😊\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcamilajaviera91%2Fr-1st-approach","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcamilajaviera91%2Fr-1st-approach","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcamilajaviera91%2Fr-1st-approach/lists"}