similar to: Lines for plot (Sweave)

Displaying 20 results from an estimated 10000 matches similar to: "Lines for plot (Sweave)"

2005 Aug 24
2
Remove NAs from Barplot
Dear List: I'm creating a series of barplots using Sweave that must assume a standard format. This is student achievement data and the x-axis must include all grades 3 to 8. In some cases, the data for a grade (or more than one grade) are missing in the vector math.bar, but are never missing for the vector apmxpmeet. The following sample code illustrates the issue. Using the code below to
2005 Jan 20
3
Constructing Matrices
Dear List: I am working to construct a matrix of a particular form. For the most part, developing the matrix is simple and is built as follows: vl.mat<-matrix(c(0,0,0,0,0,64,0,0,0,0,64,0,0,0,0,64),nc=4) Now to expand this matrix to be block-diagonal, I do the following: sample.size <- 100 # number of individual students I<- diag(sample.size) bd.mat<-kronecker(I,vl.mat) This
2004 May 21
2
Help with Plotting Function
Dear List: I cannot seem to find a way to plot my data correctly. I have a small data frame with 6 total variables (x_1 ... x_6). I am trying to plot x_1 against x_2 and x_3. I have tried plot(x_2, x_1) #obviously works fine plot(x_3, x_1, add=TRUE) # Does not work. I keep getting error messages. I would also like to add ablines to this plot. I have experimented with a number of other
2004 Feb 18
2
Area between CDFs
Dear List: I am trying to find the area between two ECDFs. I am examining the gap in performance between two groups, males and females on a student achievement test in math, which is a continuous metric. I start by creating a subset of the dataframe male<-subset(datafile, female="Male") female<-subset(datafile, female="Female") I then plot the two CDFs via
2004 Nov 28
1
Modifications to an abline
Dear List: I am working to generate graphs for individual students that will be created through a series of loops in Sweave. Before doing so, I am still trying to design the graph. The code for creating the barplot is below with some sample datapoints just made up for now. Ultimately, this chart will take data from an lme object using longitudinal student data. So, the dots represent the
2005 Jul 06
4
Tempfile error
Dear List: I am encountering an error that I can't resolve. I'm looping through rows of a dataframe to generate individual tex files using Sweave. At random points along the way, I encounter the following error Error in file() : cannot find unused tempfile name At which point Sweave halts. There isn't a logical pattern that I can identify in terms of why the program stops at
2003 Dec 21
3
Sweave/LaTeX Problem with EPS PDF
Dear List: I am unsure if my problem is with Sweave or LaTeX. Anyhow, I am using the MikTeX distribution and TexnicCenter. I can easily create Sweave files and all goes well until I try to incorporate graphics. I use the same code as found in the examples found in the users manual. In R, the graphics I want are created as Sweave is creating the .tex file. When I examine the .tex file
2007 Sep 19
2
By() with method = spearman
I have a data set where I want the correlations between 2 variables conditional on a students grade level. This code works just fine. by(tmp[,c('mtsc07', 'DCBASmathscoreSPRING')], tmp$Grade, cor, use='complete', method='pearson') However, this generates an error by(tmp[,c('mtsc07', 'DCBASmathscoreSPRING')], tmp$Grade, cor, use='complete',
2004 Nov 17
1
"Impossible to run" error message when using Sweave
Dear List: I have a large dataset of multiple schools. My goal is to produce a separate tex file for each school that plots some of the student achievement scores. Essentially, the aim is to develop a custom report for each school. To accomplish this, I have code for a loop that gets sourced into R and then Sweaves the multiple files to create the individual school reports. Here is the code for
2009 Feb 27
3
Making tapply code more efficient
Previously, I posed the question pasted down below to the list and received some very helpful responses. While the code suggestions provided in response indeed work, they seem to only work with *very* small data sets and so I wanted to follow up and see if anyone had ideas for better efficiency. I was quite embarrased on this as our SAS programmers cranked out programs that did this in the blink
2005 Dec 05
4
Broken links on CRAN
Dear List: When I click on the link to download a reference manual for a package on cran, I get an error message that the file is damaged and could not be repaired. I randomly chose various packages and the same error message appears. Are the links actually broken? I have also restarted my machine and closed and re-opened acrobat. I am using Windows XP, Acrobat Professional 6.0.0.5, and
2003 Apr 08
3
Multilevel Analyses in R
I am new to R and would like to get some practice analyzing multilevel data. I wonder if anyone can point me to a sample data set and command lines that I might replicate for a sample session. I would then compare my output with HLM output. Any help is appreciated. ------ Harold C. Doran Director of Research and Evaluation New American Schools 675 N. Washington Street, Suite 220 Alexandria,
2005 Jul 08
2
Sweave resource leak: leftover temp files (PR#7999)
This is great. Thank you for your help, but let me make sure I fully understand. Here is the looping file I use to subset the data frame, create a tex file, and Sweave it. This results in N number of tex files where N is equal to the number of rows in the data frame. list <- unique(wide$stuid) master = "master.tex" for (i in list){ tmp1 <- subset(wide, stuid==i) tmp2
2004 May 17
3
Fatal Error
Dear List: When trying to open 1.9.0 this morning, I have the following error: "Fatal Error: Unable to restore saved data in .Rdata" I am using Windows 2000. The program then quits. Do I need to reinstall? Harold C. Doran One Massachusetts Avenue, NW ยท Suite 700 Washington, DC 20001-1431 202.336.7075 [[alternative HTML version deleted]]
2004 Sep 08
8
isoMDS
Dear List: I have a question regarding an MDS procedure that I am accustomed to using. I have searched around the archives a bit and the help doc and still need a little assistance. The package isoMDS is what I need to perform the non-metric scaling, but I am working with similarity matrices, not dissimilarities. The question may end up being resolved simply. Here is a bit of substantive
2006 Jul 20
2
Timing benefits of mapply() vs. for loop was: Wrap a loop inside a function
List: Thank you for the replies to my post yesterday. Gabor and Phil also gave useful replies on how to improve the function by relying on mapply rather than the explicit for loop. In general, I try and use the family of apply functions rather than the looping constructs such as for, while etc as a matter of practice. However, it seems the mapply function in this case is slower (in terms of CPU
2006 Apr 19
4
Basic vector operations was: Function to approximate complex integral
Dear List I apologize for the multiple postings. After being in the weeds on this problem for a while I think my original post may have been a little cryptic. I think I can be clearer. Essentially, I need the following a <- c(2,3) b <- c(4,5,6) (2*4) + (2*5) + (2*6) + (3*4) + (3*5) +(3*6) But I do not know of a built in function that would do this. Any suggestions? -----Original
2006 Aug 16
6
read.csv issue
I'm trying to read in some data from a .csv format and have come across the following issue. Here is a simple example for replication # A sample .csv format schid,sch_name 331-802-7081,School One 464-551-7357,School Two 388-517-7627,School Three \& Four 388-517-4394,School Five Note the third line includes the \ character. However, when I read the data in I get >
2003 Sep 29
3
Downloading LME4?
Dear R: Am I having trouble downloading the LME4 library. I am using Windows and am using ver 1.7 I have tried the following: 1) Install package from CRAN, but LME4 is not listed 2) Downloaded LME4 from http://cran.us.r-project.org/, however, I cannot open the file when I try install from local drive. I get the following error: Error in file(file, "r") : unable to open connection
2004 Aug 04
4
Concatenating variables
Hi all: I'm having difficulty with something I believe is very simple, but I'm stuck. I have a large data frame that took days to clean and prepare. All I now need to do is concatenate three variables into a single column. For example, I have tenn$up, tenn$down, and tenn$stable which all have values of 1 or 0. I simply want to put all three columns together to create a pattern (e.g.,