similar to: question about subseting a dataframe

Displaying 20 results from an estimated 2000 matches similar to: "question about subseting a dataframe"

2008 May 09
1
data management question
Hi all, I have a data management question. I am using an panel dataset read into R as a dataframe, call it "ex". The variables in "ex" are: id year x id: a character string which identifies the unit year: identifies the time period x: the variable of interest (which might contain NAs). Here is an example: > id <- rep(c("A","B","C"),2)
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 . . . . .
2009 Mar 03
4
scatter plot question
Hi R Users, I have a dataframe like this: id x rho A 1 0.1 B 20 0.5 C 2 0.9 ... I want to do a scatter plot of "x" versus "rho" but for each point on the scatter plot I want the corresponding entry for "id" instead of points. In STATA I can do so by twoway (scatter x rho, mlabel(id)) How can I do the same in R? I am sure there is some simple way to do
2009 Feb 27
3
question about 3-d plot
Hi R Users, I have produced a simulated scatter plot of y versus x tightly clustered around the 45 degree line through the origin with the following code: x <- seq(1,100) y <- x+rnorm(100,0,10) plot(x,y,col="blue") abline(0,1) Is there some way to generate a 3-dimensional analogue of this? Can I get a similar simulated scatter plot of points in 3 dimensions where the points
2010 May 06
1
question about rolling regressions
Hi All, I am using R 2.11.0 on a Ubuntu machine. I have a time series data set and want to run rolling regressions with it. Any suggestions would be useful. Here are the details: (1) I convert relevant variables into time series objects and compute first differences: vad <- ts(data$ALLGVA/data$GDPDEF, start=1948, frequency=1) emp <- ts(data$ALLEMP, start=1948, frequency=1) vad.dif1 <-
2010 May 02
1
question about 2SLS
Hi All, I am using R 2.11.0 on a Ubuntu machine. I estimated a model using "tsls" from the package "sem". Is there a way to get Newey West standard errors for the parameter estimates? When estimating the model by OLS, I used "NeweyWest" from the package "sandwich" to get HAC standard errors. But, I am not able to use the same method with the results of the
2004 Oct 04
7
Strange Matrix Multiplication Behaviour
Hi there fellow R-users, Im seeing some strange behaviour when I multiply a vector by a matrix Here is my script: > tr 1 2 3 4 5 6 0.2217903 0.1560525 0.1487908 0.1671354 0.1590643 0.1471667 > > ex1 a b c d e f 1 0.2309579 -3.279045 -0.6694697 -1.1024404 0.2303928 -1.5527404 2
1997 Nov 03
1
R-alpha: expression(..) objects -- c(ex1, ex2) `fails'
When investigating the legend(x,y, expression ( <math>, <math> ), ....) [as suggested by Jim Lindsey], I once again stumbled over the fact that expression objects behave somewhat ``wierdly'', IMHO. We can have expressions of length(.) > 1, and access elements of these like list elements. However, other natural things don't work with expressions; some example
2009 Apr 08
1
Anova interaction not tested
I've noticed with certain datasets that when I try to do an anova and test for main effects and interaction for two explanatory variables, sometimes the main effect results are given but not the interaction results. For example, ex1 = aov(Score ~ var1*var2, data=myData) summary(ex1) gives me only the main effects for var1 and var2, but not the interaction. I also tried ex1 = aov(Score ~
2010 Sep 20
2
interpreting one-way anova tables
Hi, I am trying to reconcile anova table in R (summary(lm)) with individual t.test. datafilename="http://personality-project.org/R/datasets/R.appendix1.data" data.ex1=read.table(datafilename,header=T) #read the data into a table summary(lm(Alertness~Dosage,data=data.ex1)) gives: Call: lm(formula = Alertness ~ Dosage, data = data.ex1) Residuals:    Min     1Q Median     3Q    Max
2012 Jan 18
2
Table Intersection
I've got two tables.... first one(table1): ID chrom start end Ex1 2 152 180 Ex2 10 2000 2220 Ex3 15 3000 4000 second one ( table2): chrom location name 2 160 Alv 2 190 GNN 2 100
2007 Jan 04
1
problem with function 'optimise' (PR#9438)
Full_Name: Karsten Krug Version: 2.4.0 OS: Open Suse 10.0, Windows XP Submission from: (NULL) (88.134.13.50) I found a problem in the 'optimise' function for one dimensional optimisation. Example 1: Try to find a maximum of the function below with the use of 'optimise' in the interval [0,0.5]. The function follows a parabola and has two local maxima located at the margins of
2007 Sep 29
2
Help with functions (iterations)
Hello: I am a bit confused by this problem. Can anyone give me some advice on this I would greatly appreciate it. Thank you for all your help. Need to create a for loop that saves the estimate of pi from each 0f 100 separate iterations and store it in a numeric vector (of length 100). The for loop should be placed in a function that allows the user to vary the sample size, the simulation size,
2009 Jan 31
1
Question on Sweave-Latex and examples in the Sweave Manual
Hi List, I have a problem with using Latex and Sweave for creating a document. So I downloaded the Sweave manual from http://www.statistik.lmu.de/~leisch/Sweave/Sweave-manual.pdf and i have tried to replicate the example on pages 4-5, but i encounter the following problem: IT DOES NOT WORK. I can run Sweave, create the .tex file and then when building the .tex file in TeXnikCenter i get all
2012 Apr 30
2
Calendar Integration Problem
Hiii all, I am using asterisk 1.8.9.2 and compile all modules related to calendar. neon version is 0.29.6. OS is ubuntu 11.10. I configured ical for zimbra, caldav for google mail and ews for exchange 2010 calendar. ical and caldav setup working fine and i am getting my calendar events perfectly. But for exchange 2010 calendar i am getting following error. "Unable to communicate with
2006 Sep 05
1
Reserve and biobase
Hi I am using Rserve for R2.3.1. every time after I load Biobase library, a new Graphics window frame pops up. Could any onw know how can avoid it. Best Saeede class testReserve { public static void main(String[] args) { RServeConnection rsCon = null; Rconnection c = null; Process proc = null; try { Runtime rt = Runtime.getRuntime(); proc
2003 Feb 05
7
Winbind on HPUX 11, some small progress
Hi All, Well, i've managed to enable some debugging in syslog, I had to put in /etc/syslog.conf ;*.debug on the syslog line. So at least I have an error which is being returned into syslog from winbind. This is what I get from winbind Feb 4 21:13:17 coastdr pam_winbind[20753]: Verify user `lonnie' Feb 4 21:13:18 coastdr pam_winbind[20753]: user 'lonnie' granted acces Feb 4
2008 Jan 21
3
Need suggestions about GUI
What I want to do is: 1, creat a text box, insert text into that box. 2, select chunk of of the text by mouse, and link it to a lable. so I would like a way to get that chunk of text. Can I do such job with tcltk? Any relavant tutorial materials? Thanks -- HUANG Ronggui Bachelor of Social Work, Fudan University, China Master of sociology, Fudan University, China Ph.D. Student , CityU of
2006 Oct 14
2
(no subject)
I have a problem with smbtree. When I try smbtree -N on my PC I receive: Got a positive name query response from 192.168.0.100 ( 192.168.0.100 ) read_socket_with_timeout: timeout read. read error = Connection reset by peer. failed tcon_X with NT_STATUS_INVALID_NETWORK_RESPONSE read_socket_with_timeout: timeout read. read error = Connection reset by peer. failed tcon_X with
2001 Aug 15
2
rsync building OK on HP-UX 11.00 and 11.11?
On 8 Aug 2001, "MCCALL,DON (HP-USA,ex1)" <don_mccall@hp.com> wrote: > Hi Martin, > Thought I would let you know that rsync is failing to > build on HP-UX 11.00 and 11.11 (using HP's ansi C compiler) because of a > test you have for socklen_t; on HP-UX 11.00 and 11.11, socklen_t is not > defined in types.h, but instead is defined in socket.h > Result is that