similar to: Duplicate rows when I combine two data.frames with merge!

Displaying 20 results from an estimated 100 matches similar to: "Duplicate rows when I combine two data.frames with merge!"

2010 Sep 12
3
reshape matrix entities to columns
Greeting R helpers J I am not familiar with R but I have to use it to analyze data set that I have (30,000 20,000) I want to change the structure of the dataset and I am wondering how that might be possible in R A main data looks like this: some entities are empty Age No. Age No. Age No. Center1 5 2 8 7
2002 Nov 26
1
Reshape by multiple variables
Dear list I'm using the reshape command and want to reshape a wide data set to a long one e.g. I have the variables y1,y2,y3,age1,age2,age3,sex,ethnic I want my new long data set to consist of the variables y (which has been created from y1,y2,y3), age (which has been created from age1,age2,age3), sex and ethnic I have tried to use the command:
2012 Feb 01
4
wine command line arguments
Hi All; I have just successfully installed Microsoft: Age of Empires II, Age of Empires II-Conquerors expansion, Age of Empires III on Wine 1.3.7. No dll overides, no pissing about nothing, just dropped in the CD, mapped it to using winecfg and installed. Empires II installed directly from disk and would not run after the install until I applied the no_Cd_patch and not are fine. AoEIII has 3
2011 Jul 23
1
Extend my code to run several data at once.
Hi I have a code that calculate maximisation using optimx and it is working just fine. I want to extend the code to run several colomns of R_j where j runs from 1 to 200. If I am to run the code in its current state, it means I will have to run it 200 times manually. May you help me adjust it to accomodate several rows of R_j and print the 200 results. ***Please do not get intimidated by the
2007 Mar 05
1
Matrix/dataframe indexing
Hi all, I am hoping someone can help me out with this: If I have dataframe of years and ages and the first column and first row are filled with leading values: Df<- age1 age2 age3 Yr1 1 0.4 0.16 Yr2 1.5 0 0 Yr3 0.9 0 0 Yr4 1 0 0 Yr5 1.2 0 0 Yr6 1.4 0 0 Yr7 0.8 0 0 Yr8 0.6 0 0 Yr9 1.1 0 0 Now the rest of the cells need to be filled according to the previous year and age
2010 Jan 30
2
question about time series objects
Hi All, I have a very simple question about a time series object: how to access values for a particular year and quarter (say)? Suppose, following http://www.stat.pitt.edu/stoffer/tsa2/R_time_series_quick_fix.htm I have read in data as a time series; here is how it looks. * Qtr1 Qtr2 Qtr3 Qtr4 1960 0.71 0.63 0.85 0.44 1961 0.61 0.69 0.92 0.55 . . . . .
2005 Aug 12
2
coercing created variables into a new data frame using na.omit()
Hi, I am an R newbie and one thing I am having trouble with binding variables that I have created within one data frame into a new data frame when using na.omit(). To illustrate this problem I will give the example I am working on and the approah I have been using:- data.frame1<-filepath.... attach(data.frame1) #create a new variable using a function new.variable<-rep(1,length(weight3))
2003 Dec 17
5
beginner programming question
Hi all, The last e-mails about beginners gave me the courage to post a question; from a beginner's perspective, there are a lot of questions that I'm tempted to ask. But I'm trying to find the answers either in the documentation, either in the about 15 free books I have, either in the help archives (I often found many similar questions posted in the past). Being an (still actual)
2020 Sep 21
2
Help with the Error Message in R "Error in 1:nchid : result would be too long a vector"
Hello everyone, I am using *mlogit* to analyse my choice experiment data. I have *3 alternatives* for each individual and for each individual I have *9 questions*. I have a response from *516 individuals*. So it is a panel of 9*516 observations. I have arranged the data in long format (it contains 100 columns indicating different variables and identifiers). In mlogit I tried the following
2011 Oct 05
1
calling a variable which in turn calls many more variables
Hi all, I am running regressions with many covariates, most of which remain the same each time (control variables). Instead of writing 30 demographic variables every regression, is there a way I could call them all at once using a variable called, perhaps "demog"? I have tried: > demog <- list(age1, age2, age3) but I get an error when I try to call a list in a regression. I also
2005 Oct 20
1
Windows 2000 crash while using rbind (PR#8225)
Windows 2000 reports that "Rgui.exe has generated errors and will be = closed by Windows. You will need to restart the program." when using = rbind.=20 df1 <- data.frame(cbind(x=3D1, y=3D1:1000), fac=3Dsample(LETTERS[1:3], = 1000, repl=3DTRUE)) df2 <- data.frame(cbind(x=3D1, y=3D1:10), fac=3Dsample(LETTERS[4:6], = 10, repl=3DTRUE)) df3 <- data.frame(cbind(x=3D1,
2006 Feb 17
3
(Newbie) Functions on vectors
Folks, I want to make the following function more efficient, by vectorizing it: getCriterionDecisionDate <- function (quarter , year) { if (length(quarter) != length(year)) stop ("Quarter and year vectors of unequal length!"); ret <- character(0); for (i in 1:length(quarter)) { currQuarter <- quarter[i]; currYear <- year[i]; if ((currQuarter < 1) |
2010 Mar 18
1
Regression of a time series on its Quarters
# Dear List, # I want to characterize a time series according to its Quarter components. # My data ("a.ts": http://docs.google.com/View?id=dfvvwzr2_478cr9k4cdb)? look like: #???????????????? Qtr1????????? Qtr2????????? Qtr3????????? Qtr4 #?? 1948 -0.0714961837? 0.0101747827? 0.0654816569 -0.0227830729 #?? 1949 -0.1175517556? 0.1151378692? 0.1015777858 -0.1971535900 #?? 1950?
2012 May 12
2
x axis dates
The following data spans out to 2012 and when graphing out the data - R defaults dates on x axis only shows the years eg 2005 2007 2009 My question is how can I get the graph to show more dates on the axis - eg every qtr or 6 months or every month etc PRODUCT,DATE,AMOUNT_1,AMOUNT_2 A,3/1/2005,126647400,121942966.2 A,4/1/2005,121942966.2,122244045 A,5/1/2005,122244045,117227480.04
2001 May 06
1
legend/text in time series plot
hi, i need help on placing legend/text in a time series plot. here is what i am doing (i am using rw1022 on windoze 2000): #read data file gdpn <- scan("jngdpsa.dat", list(year=0, qtr=0, gdp=0)); gdpr <- scan("jrgdpsa.dat", list(year=0, qtr=0, gdp=0)); #convert to time series object gdpn <- ts(gdpn$gdp, frequency=4, start=c(1955,2)); gdpr <- ts(gdpr$gdp,
2009 Sep 17
3
Help with date specification
Hi everyone,I have a data daily data (x) for 10 years starting from 04-01-1995 to 03-31-2005. I was able to get the yearly sum for the ten years using aggregate(x, years, sum). But this gave me the yearly sum for 1995 (Apr- Dec); 1996 (Jan-Dec) ---------2005 (Jan-Mar). But I want to get the aggregates for Apr-1995 to Mar 1996, Apr 1996- mar 1997 and so on. your help will be higly appreciated.
2010 Aug 05
1
an issue about missing data
Hi, I am using a function 'polygenic' in the package called 'GenABEL'. -------------------------------------------------------------------------------- > h2.gs <- polygenic(b.dbp~age+age2+age3+sex+b.bmi, kin=gs.gkin, data=gs) ------------------------------------------------------------------------------- ## and I got the following error message: Error in svd(X): infinite or
2009 Mar 12
8
UK ISDN-30 and ANI
Has anyone in the UK got ANI to work on an inbound call ? Using asterisk 1.4 trunk and zaptel 1.4 trunk, with a Euro-ISDN 30 Julian ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email
2008 Jan 06
1
aggregate.ts help
Hi, I have a ts object with a frequency of 4, i.e., quarterly data, and I would like to calculate the mean for each quarter. So for example: > ts.data=ts(1:20,start=c(1984,2),frequency=4) > ts.data Qtr1 Qtr2 Qtr3 Qtr4 1984 1 2 3 1985 4 5 6 7 1986 8 9 10 11 1987 12 13 14 15 1988 16 17 18 19 1989 20 If I do this manually, the mean
2003 Dec 03
1
Any updates on the Cisco 7920 and SIP?
I know this isn't the "Cisco list", but enough people here are wired into the VoIP world that perhaps someone has heard if Cisco has released a SIP image for the 7920 yet... JT