Every time I try to upload a database into R (the file is in .xls, .csv or .txt) it transforms it and put a negative sign in front of every entry of my file. I do not really understand why. Could someone help me?
> data<-- read.table("C:\\Users\\Géraldine\\Documents\\R\\RS_simplified.txt", header = TRUE, sep="\t")
> data
Year Index r Indexcorr rcorr
1 -1957 -100.00 0.0000 -100.00 0.0000
2 -1958 -92.16 0.0784 -89.23 0.1077
3 -1959 -123.39 -0.3389 -125.85 -0.4103
4 -1960 -125.55 -0.0175 -121.48 0.0347
5 -1961 -135.18 -0.0767 -135.28 -0.1136
6 -1962 -139.47 -0.0318 -139.16 -0.0286
7 -1963 -140.72 -0.0089 -140.61 -0.0104
8 -1964 -141.97 -0.0089 -142.07 -0.0104
9 -1965 -169.44 -0.1935 -169.27 -0.1915
10 -1966 -189.45 -0.1181 -168.85 0.0025
11 -1967 -202.26 -0.0676 -180.07 -0.0665
12 -1968 -232.17 -0.1479 -218.37 -0.2127
13 -1969 -239.08 -0.0298 -220.90 -0.0116
14 -1970 -217.57 0.0900 -192.44 0.1288
15 -1971 -256.25 -0.1778 -224.01 -0.1640
16 -1972 -307.22 -0.1989 -293.22 -0.3089
17 -1973 -402.77 -0.3110 -354.73 -0.2098
18 -1974 -363.61 0.0972 -316.75 0.1071
19 -1975 -290.66 0.2006 -250.89 0.2079
20 -1976 -261.31 0.1010 -223.75 0.1082
21 -1977 -260.68 0.0024 -224.25 -0.0022
22 -1978 -298.69 -0.1458 -256.07 -0.1419
23 -1979 -322.86 -0.0809 -272.49 -0.0641
24 -1980 -324.22 -0.0042 -270.26 0.0082
25 -1981 -283.94 0.1243 -238.83 0.1163
26 -1982 -237.56 0.1634 -197.49 0.1731
27 -1983 -243.21 -0.0238 -202.62 -0.0260
28 -1984 -247.40 -0.0172 -212.10 -0.0468
29 -1985 -271.17 -0.0961 -230.80 -0.0882
30 -1986 -342.76 -0.2640 -291.75 -0.2640
31 -1987 -471.38 -0.3753 -406.86 -0.3946
32 -1988 -575.35 -0.2206 -492.07 -0.2094
33 -1989 -713.58 -0.2403 -627.57 -0.2754
34 -1990 -757.79 -0.0620 -666.68 -0.0623
35 -1991 -513.24 0.3227 -420.25 0.3696
36 -1992 -462.02 0.0998 -374.26 0.1095
37 -1993 -392.01 0.1515 -319.51 0.1463
38 -1994 -389.41 0.0066 -323.27 -0.0118
39 -1995 -394.58 -0.0133 -328.17 -0.0152
40 -1996 -392.66 0.0049 -324.78 0.0103
41 -1997 -392.60 0.0002 -332.02 -0.0223
42 -1998 -403.65 -0.0282 -344.60 -0.0379
43 -1999 -424.54 -0.0517 -364.60 -0.0580
44 -2000 -411.94 0.0297 -361.28 0.0091
45 -2001 -387.26 0.0599 -342.86 0.0510
46 -2002 -416.88 -0.0765 -369.08 -0.0765
47 -2003 -466.69 -0.1195 -405.40 -0.0984
48 -2004 -518.74 -0.1115 -456.07 -0.1250
49 -2005 -530.76 -0.0232 -479.76 -0.0519
50 -2006 -588.51 -0.1088 -557.62 -0.1623
51 -2007 -723.27 -0.2290 -699.91 -0.2552
Thank you very much for your concern.
Géraldine
When you write
you are really writing
or equivalently
Just remove the second dash, and your data will not be multiplied by -1. R simply did what you told it to.