Regression via csv file, takes numeric number instead of absolute

Hi, I've tried to make a regression using the lm function. The data is collected from a CSV file with absolute numbers. But when I run the code, it states that I have to make the variable "numeric". When I do this, the absolute numbers change in numbers ranging from 1 to 304. But I need R to take the normal numbers as stated in the CSV file to make a good regression. Does anyone know how I can make R read the normal numbers that are used in the CSV file instead of making it into numeric?
Thanks in advance!

Code that I used:

Code to read excel (CSV file)

Data2018G<- read.csv(file = "Data2018G.csv", head = TRUE, sep=";")
Data2018G

#Attach Data and names
ISIN = Data2018G$ISIN
Name = Data2018G$Name
Industry = Data2018G$Industry
Vlook.Up = Data2018G$Vlookup.Adds
Currency = Data2018G$Currency
Assets = Data2018G$Assets
Debt = Data2018G$Debt
ROE = Data2018G$ROE
Revenu = Data2018G$Revenu
Delta.Market.Value = Data2018G$Delta.Market.Value

#Changing variables
Data2018G$Market.Value<-as.numeric(Data2018G$Market.Value)
Data2018G$Industry<-as.numeric(Data2018G$Industry)
Data2018G$ISIN<-as.numeric(Data2018G$ISIN)
Data2018G$Name<-as.numeric(Data2018G$Name)
Data2018G$Vlookup.Adds<-as.factor(Data2018G$Vlookup.Adds)
Data2018G$Debt<-as.numeric(Data2018G$Debt)
Data2018G$ROE<-as.numeric(Data2018G$ROE)
Data2018G$Revenu<-as.numeric(Data2018G$Revenu)
Data2018G$Currency<-as.numeric(Data2018G$Currency)
Data2018G$Assets<-as.numeric(Data2018G$Assets)
Data2018G$Vergelijking.Met.Vorig.Jaar.Market.Value<-as.numeric(Data2018G$Vergelijking.Met.Vorig.Jaar.Market.Value)
Data2018G$Delta.Market.Value<-as.numeric(Data2018G$Delta.Market.Value)
Data2018G

#Summary Dataset
summary(Data2018G)
View(Data2018G)

#Multiple Regression
Model0 <- lm(Delta.Market.Value ~ Market.Value + Industry + Vlookup.Adds + Currency + Assets + Debt + ROE + Revenu, data = Data2018G)

#Summary
summary(Model0)

#ask for confidence intervals for the model coefficients
confint(Model0, conf.level=0.95)

#check the regression diagnostic plots for this model
plot(Model0)

The problem is that R thinks some of your data are characters. We have to see the actual data to understand why that is. Please post the result of the commands

Data2018G<- read.csv(file = "Data2018G.csv", head = TRUE, sep=";")
dput(head(Data2018G))

Dear FJCC,

Underneath I've added some of the actual data as it is represented in the CSV file.
When I load the CSV file into R, it recognizes all the values ad "factor" and only "year" as an integer.

Thank you for your feedback!

Data from file:

        ISIN Year                                                          Name

1 US0367521038 2018 ANTHEM
2 IT0000062072 2018 ASSICURAZIONI GENERALI
3 ES0113211835 2018 BBV.ARGENTARIA
4 ES0113679I37 2018 BANKINTER 'R'
5 US14915V2051 2018 CATHAY FINCIAL (OTC) HOLDING GDR
6 FR0000064578 2018 COVIVIO
7 TH0737010R15 2018 CP ALL NVDR
8 US23918K1088 2018 DAVITA
9 KR7005830005 2018 DB INSURANCE
10 GB0002374006 2018 DIAGEO
11 KR7005830005 2018 DB INSURANCE
12 SE0009922164 2018 ESSITY B
13 US3703341046 2018 GENERAL MILLS
14 ZAE000018123 2018 GOLD FIELDS
15 DE0006070006 2018 HOCHTIEF
16 KR7004020004 2018 HYUNDAI STEEL
17 GB00BMJ6DW54 2018 INFORMA
18 IT0003856405 2018 LEORDO
19 KR7051900009 2018 LG HHLD.& HLTH.CARE
20 BRLRECNOR1 2018 LOJAS RENNER ON
21 ES0124244E34 2018 MAPFRE
22 GB00BWFY5505 2018 NIELSEN
23 JP3657400002 2018 NIKON
24 JP3735400008 2018 NIPPON TELG. & TEL.
25 AT0000743059 2018 OMV
26 IT0005278236 2018 PIRELLI & C
27 US79466L3024 2018 SALESFORCE.COM
28 AN8068571086 2018 SCHLUMBERGER
29 US8168511090 2018 SEMPRA EN.
30 TH0015010018 2018 SIAM COML. BANK FB
31 JP3663900003 2018 SOJITZ
32 US8545021011 2018 STANLEY BLACK & DECKER
33 NL0000226223 2018 STMICROELECTRONICS
34 AU000000SYD9 2018 SYDNEY AIRPORT STAPLED UNITS
35 AU000000TAH8 2018 TABCORP HOLDINGS
36 TW0002887007 2018 TAISHIN FINCIAL HLDG.
37 JP3596200000 2018 TOTO
38 US94106L1098 2018 WASTE MAGEMENT
39 US95040Q1040 2018 WELLTOWER
40 US00846U1016 2018 AGILENT TECHS.
41 JP3429800000 2018 A HOLDINGS
42 USN070592100 2018 ASML HLDG.ADR 1:1
43 TW84149738 2018 AU OPTRONICS ADR 1:10
Industry
1 Hospital & Medical Service Plans
2 Life Insurance
3 Commercial Banks, NEC
4 Commercial Banks, NEC
5 National Commercial Banks
6 Operators of Nonresidential Buildings
7 Retail-Convenience Stores
8 Services-Misc Health & Allied Services, NEC
9 Fire, Marine & Casualty Insurance
10 Malt Beverages
11 Fire, Marine & Casualty Insurance
12 Plastics, Foil & Coated Paper Bags
13 Grain Mill Products
14 Gold and Silver Ores
15 Heavy Construction Other Than Bldg Const - Contractors
16 Steel Works, Blast Furnaces & Rolling Mills (Coke Ovens)
17 Books: Publishing or Publishing & Printing
18 Aircraft
19 Perfumes, Cosmetics & Other Toilet Preparations
20 #N/B
21 Fire, Marine & Casualty Insurance
22 Services-Business Services, NEC
23 Optical Instruments & Lenses
24 Telephone Communications (No Radiotelephone)
25 Petroleum Refining
26 Tires & Inner Tubes
27 Services-Prepackaged Software
28 Oil & Gas Field Services, NEC
29 Gas & Other Services Combined
30 Commercial Banks, NEC
31 Wholesale-Petroleum & Petroleum Products (No Bulk Stations)
32 Machine Tools, Metal Cutting Types
33 Semiconductors & Related Devices
34 Airports, Flying Fields & Airport Terminal Services
35 Services-Membership Sports & Recreation Clubs
36 Commercial Banks, NEC
37 Pottery & Related Products
38 Refuse Systems
39 Real Estate Investment Trusts
40 Instruments For Meas & Testing of Electricity & Elec Signals
41 Air Transportation, Scheduled
42 Special Industry Machinery, NEC
43 #N/B
vlookup.am.controle Vlookup.Adds Currency TOTAL.ASSETS
1 Anthem Inc addition U$ 70540000
2 Assicurazioni Generali SpA addition E 529254000
3 Banco Bilbao Vizcaya Argentaria SA addition E 675334000
4 Bankinter SA addition E 71144473
5 Cathay Financial Holding addition #N/B
6 Covivio addition E 21727049
7 CP ALL PCL addition TB
8 DaVita Inc addition U$ 18948193
9 DB INSURANCE addition KW 47692828749
10 Diageo PLC addition \x9c 29923000
11 DB INSURANCE addition KW 47692828749
12 Essity AB - B shares addition SK 144784000
13 General Mills Inc addition U$ 22191500
14 Gold Fields Ltd addition R 81010736
15 HOCHTIEF AG addition E 13193004
16 Hyundai Steel Co addition KW 33353811922
17 Informa PLC addition \x9c 4883100
18 Leonardo S.p.a. addition #N/B
19 LG Household & Health Care addition KW 4760956199
20 #N/B #N/B C 7348447
21 Mapfre SA addition E 62283050
22 Nielsen Holdings plc addition U$ 16696000
23 Nikon Corp addition Y 1075798000
24 Nippon Tel & Tel Corp addition Y 20639046000
25 OMV AG addition E 30832000
26 Pirelli & C addition E 12622361
27 Salesforce.com addition U$ 17458440
28 Schlumberger Ltd addition U$ 71987000
29 Sempra Energy addition U$ 50284000
30 Siam Commercial Bank PCL addition TB 3023921268
31 Sojitz Corp addition Y 2449025000
32 Stanley Black & Decker addition U$ 19079900
33 STMicroelectronics NV addition E 8475942
34 Sydney Airport addition A$ 12323100
35 Tabcorp Holdings Ltd addition A$ 13355500
36 Taishin Financial Holding Co Ltd addition #N/B
37 Toto addition Y 557389000
38 Waste Management Inc addition #N/B
39 Welltower Inc addition U$ 27944445
40 Agilent Technologies Inc continuation U$ 8426000
41 ANA Holdings Inc continuation #N/B
42 ASML Holding NV continuation U$ 21780202
43 #N/B #N/B U$ 14643026
EO.TOTAL.ASSETS Assets NET.DEBT EO.DEBT Debt
1 61644906 61644906000 16322900 14264582,31 14264582310
2 529254000 5,29254E+11 8393000 8393000 8393000000
3 675334000 6,75334E+11 145091000 145091000 1,45091E+11
4 71144473 71144473000 10316070 10316070 10316070000
5 #WAARDE! 0 #WAARDE!
6 21727049 21727049000 8743152 8743152 8743152000
7 #WAARDE! 0 #WAARDE!
8 16558825,86 16558825863 8784481 7676757,946 7676757946
9 37200406,42 37200406424 7474206 5829,88068 5829880,68
10 33331229,7 33331229700 8982000 10005049,8 10005049800
11 37200406,42 37200406424 7474206 5829,88068 5829880,68
12 14204758,24 14204758240 48643000 4772364,73 4772364730
13 19393151,85 19393151850 8764700 7659471,33 7659471330
14 4867125,019 4867125019 16337988 981586,319 981586319
15 13193004 13193004000 -1129478 -1129478 -1129478000
16 26015973,3 26015973299 10623461430 8286299,915 8286299915
17 5439285,09 5439285090 1373100 1529496,09 1529496090
18 #WAARDE! 0 #WAARDE!
19 3713545,835 3713545835 200973575 156759,3885 156759388,5
20 1648991,507 1648991507 728583 163494,0252 163494025,2
21 62283050 62283050000 2670700 2670700 2670700000
22 14590634,4 14590634400 7785000 6803311,5 6803311500
23 8541836,12 8541836120 -260859000 -2071220,46 -2071220460
24 163874025,2 1,63874E+11 3344679000 26556751,26 26556751260
25 30832000 30832000000 3462000 3462000 3462000000
26 12622361 12622361000 3315715 3315715 3315715000
27 15256930,72 15256930716 -1033861 -903491,1279 -903491127,9
28 62909439,3 62909439300 13110000 11456829 11456829000
29 43943187,6 43943187600 18996000 16600604,4 16600604400
30 81736591,87 81736591874 146314083 3954869,663 3954869663
31 19445258,5 19445258500 771023000 6121922,62 6121922620
32 16673924,61 16673924610 3176200 2775681,18 2775681180
33 8475942 8475942000 -447024 -447024 -447024000
34 7600888,08 7600888080 8403100 5183032,08 5183032080
35 8237672,4 8237672400 2782000 1715937,6 1715937600
36 #WAARDE! 0 #WAARDE!
37 4425668,66 4425668660 -65115000 -517013,1 -517013100
38 #WAARDE! 0 #WAARDE!
39 24420650,49 24420650486 11439499 9996978,176 9996978176
40 7363481,4 7363481400 -671000 -586386,9 -586386900
41 #WAARDE! 0 #WAARDE!
42 19033718,53 19033718528 -375899 -328498,1361 -328498136,1
43 12796540,42 12796540421 283942 248136,9138 248136913,8
vlookup.am.controle2 MARKET.VALUE EO.MARKET.VALUE MV.1.000.000
1 ANTHEM INC. 239,3448 158,3258 158325800
2 ASSICURAZIONI GENERALI SPA 14,88 15,76 15760000
3 BANCO BILBAO VIZCAYA ARGENTARIA SA 5,49 7,561 7561000
4 BANKINTER SA 7,932 8,004 8004000
5 #N/B 36,19212063 34 33519566
6 COVIVIO S.A. 89,75 87,89 87890000
7 #N/B 1,857083185 1,703058557 1703059
8 DAVITA INC. 62,5589 49,5206 49520600
9 DB INSURANCE CO. LTD 56,865 56,8602 56860200
10 DIAGEO PLC 30,1476 27,6359 27635900
11 DB INSURANCE CO. LTD 56,865 56,8602 56860200
12 #N/B 21,9408291 22 22409929
13 GENERAL MILLS INC 37,4847 43,1585 43158500
14 GOLD FIELDS LIMITED 2,2125 4,0248 4024800
15 HOCHTIEF AG 141,3 142,337 142337000
16 HYUNDAI STEEL COMPANY 44,1329 41,1263 41126300
17 INFORMA PLC 8,4511 7,5709 7570900
18 LEONARDO S.P.A. 10,38 15,85 15850000
19 LG HOUSEHOLD & HEALTHCARE LTD. 996,6997 729,057 729057000
20 #N/B #N/B #N/B #N/B
21 MAPFRE SA 2,702 2,754 2754000
22 NIELSEN HOLDINGS PLC 24,1572 34,5618 34561800
23 NIKON CORPORATION 16,8242 14,4091 14409100
24 NIPPON TELEGRAPH AND TELEPHONE CORPORATION 20,2206 19,0434 19043400
25 OMV AKTIENGESELLSCHAFT 48,39 49,29 49290000
26 PIRELLI & C. S.P.A. 7,228 n.a. #WAARDE!
27 SALESFORCE.COM, INC. 138,8908 77,8955 77895500
28 SCHLUMBERGER N.V. 53,2052 58,1673 58167300
29 SEMPRA ENERGY 99,3449 95,1639 95163900
30 #N/B 4,010223109 3,903639839 3903640
31 SOJITZ CORPORATION 3,2309 2,2969 2296900
32 STANLEY BLACK & DECKER, INC. 127,8951 125,8818 125881800
33 STMICROELECTRONICS N.V. 15,67 16,37 16370000
34 SYDNEY AIRPORT 4,2471 4,6242 4624200
35 TABCORP HOLDINGS LIMITED 3,002 2,7771 2777100
36 #N/B #N/B #N/B #N/B
37 TOTO LTD 37,1551 35,0071 35007100
38 WASTE MANAGEMENT INC 78,917 65,2631 65263100
39 WELLTOWER INC. 56,1746 58,6009 58600900
40 #N/B #N/B #N/B #N/B
41 ANA HOLDINGS INC. 31,2844 31,4547 31454700
42 #N/B 160,899994 144,050003 144050003
43 #N/B 0,366588674 0,339416815 339417
t.1.market.value Delta.Market.Value ROE SALES.REVENUE. EO.SALES Revenu
1 158,3258 0,511723295 9,91 84978400 74262623,76 74262623760
2 15,76 -0,055837563 11,42 84968000 84968000 84968000000
3 7,561 -0,273905568 6,79 38513000 38513000 38513000000
4 8,004 -0,008995502 11,96 2514693 2514693 2514693000
5 34 0,079731188 #N/B #N/B
6 87,89 0,021162817 14,76 904071 904071 904071000
7 1,703058557 0,090440007 #N/B #N/B
8 49,5206 0,263290429 18,93 14745105 12885747,26 12885747260
9 56,8602 8,44176E-05 13,48 15875538283 12382919,86 12382919861
10 27,6359 0,090885406 24,83 11300000 12587070 12587070000
11 56,8602 8,44176E-05 13,48 15875538283 12382919,86 12382919861
12 22 -0,020932686 11,44 101238000 9932460,18 9932460180
13 43,1585 -0,131464254 39,04 15950300 13938967,17 13938967170
14 4,0248 -0,450283244 5,62 39928844 2398924,948 2398924948
15 142,337 -0,007285527 17,57 19908328 19908328 19908328000
16 41,1263 0,073106504 5,09 16691511904 13019379,29 13019379285
17 7,5709 0,116260947 7,85 1345700 1498975,23 1498975230
18 15,85 -0,34511041 #N/B #N/B
19 729,057 0,367108059 22,44 6094059406 4753366,337 4753366337
20 #N/B 23,71 6451578 1447734,103 1447734103
21 2,754 -0,018881627 9,15 22316690 22316690 22316690000
22 34,5618 -0,301043348 12,24 6309000 5513435,1 5513435100
23 14,4091 0,167609358 1,97 790436000 6276061,84 6276061840
24 19,0434 0,061816692 9,03 11406134000 90564703,96 90564703960
25 49,29 -0,018259282 -4,64 19260000 19260000 19260000000
26 n.a. 4,31 6058431 6058431 6058431000
27 77,8955 0,783040099 3,02 7907394 6910271,617 6910271617
28 58,1673 -0,085307381 -4,11 27810000 24303159 24303159000
29 95,1639 0,043934727 10,59 10201000 8914653,9 8914653900
30 3,903639839 0,027303561 14,25 219898743 5943863,023 5943863023
31 2,2969 0,40663503 6,48 1511427000 12000730,38 12000730380
32 125,8818 0,015993575 15,16 11406900 9968489,91 9968489910
33 16,37 -0,042761148 2,22 6317677 6317677 6317677000
34 4,6242 -0,081549241 29,37 1364600 841685,28 841685280
35 2,7771 0,08098376 8,82 2213900 1365533,52 1365533520
36 #N/B #N/B #N/B
37 35,0071 0,061358981 11,36 559414000 4441747,16 4441747160
38 65,2631 0,209213169 #N/B #N/B
39 58,6009 -0,041403801 7,81 4281160 3741305,724 3741305724
40 #N/B 10,89 4202000 3672127,8 3672127800
41 31,4547 -0,005414135 #N/B #N/B
42 144,050003 0,116973208 15,68 7499572 6553875,971 6553875971
43 0,339416815 0,080054544 4,34 10214924 8926822,084 8926822084
[ reached getOption("max.print") -- omitted 381 rows ]

str(Data2018G)
'data.frame': 424 obs. of 23 variables:
ISIN : Factor w/ 384 levels "","AEG000101010",..: 280 152 86 88 298 102 260 304 197 122 ... Year : int 2018 2018 2018 2018 2018 2018 2018 2018 2018 2018 ...
Name : Factor w/ 387 levels "","3M ","A HOLDINGS ",..: 22 24 47 40 74 94 96 102 103 109 ... Industry : Factor w/ 193 levels "#N/B","Abrasive, Asbestos & Misc Nonmetallic Mineral Prods",..: 59 72 26 26 88 96 123 153 49 75 ...
vlookup.am.controle : Factor w/ 249 levels "","#N/B","3m Co",..: 17 20 26 31 52 64 66 70 71 75 ... Vlookup.Adds : Factor w/ 5 levels "#N/B","addition",..: 2 2 2 2 2 2 2 2 2 2 ...
Currency : Factor w/ 48 levels "","#N/B","\x9c",..: 45 17 17 17 2 17 42 45 24 3 ... TOTAL.ASSETS : Factor w/ 180 levels "","#N/B","100414000",..: 147 131 142 149 1 71 1 57 127 91 ...
EO.TOTAL.ASSETS : Factor w/ 245 levels "","#N/B","#WAARDE!",..: 192 174 200 211 3 94 3 62 143 131 ... Assets : Factor w/ 382 levels "","0","1,06795E+11",..: 296 253 287 325 2 132 2 93 211 190 ...
NET.DEBT : Factor w/ 244 levels "","-1033861",..: 110 228 98 63 1 232 1 234 217 236 ... EO.DEBT : Factor w/ 245 levels "","-106000","-1129478",..: 92 227 93 66 61 232 61 222 199 62 ...
Debt : Factor w/ 355 levels "","-1,42881E+11",..: 155 334 118 129 1 339 1 329 299 125 ... vlookup.am.controle2: Factor w/ 108 levels "","#N/B","AEGON NV",..: 7 8 11 14 2 29 2 31 32 33 ...
MARKET.VALUE : Factor w/ 289 levels "","#N/B","0",..: 121 59 205 254 173 274 19 237 222 157 ... EO.MARKET.VALUE : Factor w/ 125 levels "","#N/B","0,339416815",..: 36 34 109 117 72 119 13 91 101 62 ...
MV.1.000.000 : Factor w/ 123 levels "","#N/B","#WAARDE!",..: 27 26 109 116 64 117 33 86 95 55 ... t.1.market.value : Factor w/ 290 levels "","#N/B","0",..: 64 61 244 267 152 273 17 201 215 126 ...
Delta.Market.Value : Factor w/ 296 levels "","-0,000650464",..: 288 32 118 8 193 169 202 255 296 203 ... ROE : Factor w/ 234 levels "","-0,09","-0,16",..: 233 68 194 74 1 95 1 123 84 146 ...
SALES.REVENUE. : Factor w/ 349 levels "","-104.973",..: 328 327 216 153 3 339 3 74 84 38 ... EO.SALES : Factor w/ 291 levels "","#N/B","0",..: 251 266 178 125 2 273 2 36 31 33 ...
$ Revenu : Factor w/ 348 levels "","-104.973",..: 305 324 211 153 1 335 1 50 47 49 ...

Pablo, you've pasted a lot of difficult to use text, you have not provided what FJCC asked you to provide which would have been better. Please consider editing your post.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.