similar to: diff() for panel data

Displaying 20 results from an estimated 300 matches similar to: "diff() for panel data"

2013 May 11
1
(no subject)
Hello, I am attempting to use the "classInt" package in conjunction with "rworldmap" package in R to construct a chloropleth. I want to use the fixedBreaks argument to specify given breaks. My data look like this: > head(Maji) Country waterused CC 1 Afghanistan 36 AFG 2 Albania 4 ALB 3 Algeria
2019 Feb 19
2
Cambiar el formato de datos
Después del "gather()" puedes hacer un "arrange()" que es una ordenación. Y dentro de "arrange()" le indicas la variable por la que ordenas (no hacen falta comillas)... Lo ordenará alfabéticamente. Saludos, Carlos Ortega www.qualityexcellence.es El mar., 19 feb. 2019 a las 13:47, Antonio Rodriguez Andres (< antoniorodriguezandres70 en gmail.com>) escribió:
2019 Feb 19
2
Cambiar el formato de datos
> gather(pobla, key = year, value = totpop, year60:year63) Country year totpop 1 Afghanistan year60 8996351 2 Albania year60 1608800 3 Algeria year60 11124888 4 Andorra year60 13411 Gracias Carlos Antonio On Tue, 19 Feb 2019 at 12:54, Carlos Ortega <cof en qualityexcellence.es> wrote: > Sí, tienes varias formas. > > Mira la función
2011 Jun 16
1
Merging rows in a dataframe
Hi R Help list I'm looking to visualise US foreign aid 1946-2009 and I have the dataset for this. The trouble is it's a bit too complex and I need to simply it I want to merge all of the rows with the same country together and add up the individual totals to make one total figure per country per year Below is an example of the kind of data. The real dataset has 2447 rows and covers 63
2019 Feb 19
2
Cambiar el formato de datos
Estimados miembros de la comunidad de R Tengo el siguiente formato en un fichero csv que corresponde a datos de la población para un conjunto de países y para un rango amplio de años. Pais 1960 1961 1962 1963 Albania vvvvv vvvv Algeria vvvvv vvvv Me gustaría pasarlo a la siguiente forma Pais Año Poblacion Albania 1960 vvv Albania 1961 vvvv Albania
2007 Mar 26
1
Handling Multiple Select Lists
Hi All, After much searching and head scratching I post you this! I can''t seem to find a generic way to handle multiple select data. The function I use to receive form values will only pass the first selected value from a multiple select. I have pasted part of the form and the function below. Thanks for any pointers, Vince // Example selectbox <select
2011 Aug 16
3
invalid multibyte string at '<a0>'
Hi I have a problem reading files from Windows... these files have, instead of NA on last column. special ending '<a0>' which makes problem... This problem does not appear while reading the same file in Windows! Try: read.csv("http://dl.dropbox.com/u/6113358/prob.csv") Could you please tell me if you also have this problem? I have tried either by cleaning the file on
2007 Jul 12
2
how to get the p-values from an lm function ?
Hi, dear R-users, I am computing a liner regression by rating category using the 'by' function as stated below: tmp <- by(projet, rating, function(x) lm(defaults ~ CGDP+CSAVE+SP500, data = x)) I would like to get not only the coefficients but also their p-values. I can't find the command in the help pages to get them. Does anyone have a suggestion ? Thank you, Benoit.
2009 Mar 25
2
linking environments
Dear R-helpers, I try to use nested R-functions as follows: help1 = function(){ x = 1 help2() } with help2 = function(){ if (x == 1) cat("Hello world x = 1") } If I compile these functions and run help1() an error message occurs Fehler in help2() : objekt "x" nicht gefunden in english "error in help2(): object
2018 May 13
0
Dataverse (reading files with .tab and .7z suffixes)
Ilio Fornasero writes: > Yet, I am at this point. > > > > > ## 01. Finding the dataverse server and making a search > Sys.setenv("DATAVERSE_SERVER" =3D "dataverse.harvard.edu") > dataverse_search(".Hunger") > > > ## 02. Loading the dataset (in this example, I have chosen the word ".Hunge= > r" to get > # one list and
2009 Jan 07
2
Function to recognise convert dates between gregorian and other calendars (e.g. Persian)?
Dear list, I will shortly have some data that contains numeric dates in the Persian / Jalali calendar format, which I would like to convert to gregorian. At the moment there doesn't seem to be a function for this in R, but it would be great if someone could come up with same - I would attempt it but the algorithm is very complex and this is also way beyond my fairly rudimentary knowledge of
2006 Jul 18
2
how can I delete rows?
Hello, I am very new in R so I am so sorry for this question. I have the Barro-Lee data set which contains 98 countries and I want to run the regressions only for the Latin America countries, so what do you recomend? How can I delete all the other countries or how can I select the countries of Lat. Am. thank you this is the list of countries SHCODE COUNTRY NAME WBCTRY
2010 Dec 02
6
Filter data
Hello, I understand that question is probably stupid, but ... I have data (polity IV index) "country","year","democ","autoc","polity","polity2" "1","Afghanistan ",1800,1,7,-6,-6 "2","Afghanistan ",1801,1,7,-6,-6 "3","Afghanistan
2020 Oct 20
5
write.csv covert Åland to <c5>land
Hi there, I tried to export the names of country to a csv file with write.csv(). In the resulted file, ?land was coverted to <c5>land. Is there any way could prevent this happening? Thanks! > abc [1] "?land" > write.table(abc, file = "") "x" "1" "<c5>land" Best, Jinsong
2020 Oct 20
0
write.csv covert Åland to <c5>land
Hi there, Why the same string is displayed in different form? > abc[,1] [1] "?land" "Afghanistan" > abc name 1 <c5>land 2 Afghanistan And more... > dput(abc, "aa.txt") > dget("aa.txt") name 1 <c5>land 2 Afghanistan > dget("aa.txt")[,1] [1] "<c5>land"
2012 Nov 18
2
Question about making histogram and x must be numeric
Hello all, I hope someone of you can help me out, I have searched other posts as well but I can't find any solution to the problem I'm dealing with. I want to make a histogram from the data Telephone Lines MDGdataset <-read.csv("MDG_dataset_2010.csv", header=T) MDGdatasetAdapted <- subset(MDGdataset, select = c(Country_Code, Country_Name, Year,
2018 Jan 19
1
Web scraping different levels of a website
Hey Ilio, I revisited the previous code i posted to you and fixed some things. This should let you collect as many studies as you like, controlled by the num_studies arg. If you try the below url in your browser you can see that it returns a "simpler" version of the link you posted. To get to this you need to hit F12 to open Developer Tools --> go to Network tab and click on the
2020 Oct 20
1
write.csv covert Åland to <c5>land
It looks like an encoding problem. It works fine for me with R encoding set to UTF-8 Here is part of my sessionInfo() results [1] LC_CTYPE=en_CA.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_CA.UTF-8 LC_COLLATE=en_CA.UTF-8 [5] LC_MONETARY=en_CA.UTF-8 LC_MESSAGES=en_CA.UTF-8 I would suggest issuing the command sessionInfo() and seeing what your encoding is. On Tue, 20 Oct 2020 at 08:22,
2004 Oct 06
3
read.delim problem with trailing spaces
I'm trying to read a comma delimited dataset that uses '.' for NA. I found that if the last field on a line was a missing '.' it was not read as NA, but just a '.', and the life variable was made a factor. The data looks like this, income,imr,region,oilexprt,imr80,gnp80,life Afghanistan,75,400.0,4,0,185.0,.,37.5 Algeria,400,86.3,2,1,20.5,1920,50.7
2020 Oct 20
1
write.csv covert Åland to <c5>land
You don't say, but I'd guess you're using Windows. In your code page, the character ? is probably not representable. At some point in the sequence of operations involved in printing the dataframe R puts the string into the native encoding, and since that's impossible on your system, it substitutes the <c5> instead. The fact that you can sometimes display it is because