You should do the data processing step outside of the model formula/fitting. When creating the factor from b you can specify the ordering of the levels using factor(b, levels = c(3,1,2,4,5)). Do this in a data processing step outside the lm() call though. My answer below uses the relevel() function so you can create a factor and then shift the reference level around to suit as you need to.
Microsoft Excel is the industry leading spreadsheet application and data analysis tool. Explore free spreadsheet software tools with advanced features in Excel.
Online, collaborative spreadsheets. Google Sheets helps you track, organize and analyze your data on any device. Format and polish data with a few clicks, collaborate in real-time and input accurate, rich data using smart chips for names, files, dates, dropdown menus, events and more. Sign in
Gemini in Sheets can help you analyze data by detecting patterns and making suggestions, saving time and reducing errors. With Connected Sheets you can access, analyze, visualize and share...
Most templates work best in Google Sheets, and can be downloaded and opened in Excel, depending on the features used. Many templates include clean input tabs, monthly rollups, and optional data visualizations so you can turn raw entries into data-driven decisions.
Chapter 01 of Physics Part-I ncert book titled - Physical world for class 11
Chapter 02 of Physics Part-I ncert book titled - Units and measurements for class 11
Chapter 03 of Physics Part-I ncert book titled - Motion in a straight line for class 11
Chapter 01 of Physics Part-I ncert book titled - Electric charges and fields for class 12