similar to: DROP and KEEP statements in R

Displaying 20 results from an estimated 300 matches similar to: "DROP and KEEP statements in R"

2006 Dec 14
5
Nicely formatted tables
If I use latex(summary(X)) where X is a data frame with four variables I get something like Rainfall Education Popden Nonwhite Min. :10.00 Min. : 9.00 Min. :1441 Min. : 0.80 1st Qu.:32.75 1st Qu.:10.40 1st Qu.:3104 1st Qu.: 4.95 Median :38.00 Median :11.05 Median :3567 Median :10.40 Mean :37.37 Mean :10.97 Mean :3866
2007 Nov 07
1
Shortcut to refer to an attached dataframe?
When I attach data frames I often want to be able to refer to the whole data frame rather then one of its components. For example: attach (my.data.frame) summary(my.data.frame) That's fine but often the frame has a very long name so I'd prefer some shorthand way of referring to it by its position on the search list. This applies especially to cases where I have a nested data frame
2012 Apr 25
1
recommended way to group function calls in Sweave
Dear all When using Sweave, I'm always hitting the same bump: I want to group repetitive calls in a function, but I want both the results and the function calls in the printed output. Let me explain myself. Consider the following computation in an Sweave document: summary(iris[,1:2]) cor(iris[,1:2]) When using these two calls directly, I obtain the following output: > summary(iris[,1:2])
2005 Aug 05
3
Latex error with Sweave example
I created a tex file following the example in the Sweave help which produced the following files in my working directory. Sweave-test-1-006.eps Sweave-test-1-006.pdf Sweave-test-1-007.eps Sweave-test-1-007.pdf Sweave-test-1.tex When I run latex on this, I get a latex error, log file below. I am running R 2.1.1 on Windows XP. I have installed "small MiKTeX" and I have added
2012 Oct 10
2
Summary using by() returns character arrays in a list
I use by() to generate a summary statistics like so: Lbys <- by(dat[Nidx], dat$LipTest, summary) where Nidx is an index vector with names picking out the columns in the data frame dat. This returns a list of character arrays (see below for str() output) where the columns are named correctly but the rownames are empty strings and the values are strings prepended with the summary
2009 Apr 29
1
RweaveHTML (R2HTML) Help
I have found Sweave() to be great for producing PDF documents. I have been experimenting with RweaveHTML (from the R2HTML) package and have had moderate success. My main issue has been that I simply want the R output to be shown verbatim in the HTML document but RweaveHTML tends to convert most output to a table, for example. So, is there a way to force the RweaveHTML driver to simply provide
1999 Oct 25
1
trouble reading in datasets
Dear All, I was trying to follow some of the examples in Venables and Ripley "Modern applied ... with S-plus" I have downloaded a copy of the iris data set and loaded into R. : however I cannot use the apply command (from p47): > apply (iris, 2 ,mean) Error in sum(..., na.rm = na.rm) : invalid "mode" of argument > apply (iris, c(2) ,mean) Error in sum(..., na.rm =
2007 Dec 05
1
alternatives to latex() or xtable() ?
Hello everyone, I have several problems with exporting to LaTeX the output of numSummary() from the abind package. > numSummary(finance[,"Cash_flow"], statistics=c("mean", "sd", "quantiles")) mean sd 0% 25% 50% 75% 100% n NA 188070.9 414771.9 -426804 26743 53866 150975.5 1871500 54 4 >
2009 Apr 27
2
R-Help
 Good Day!  Could you please help us with R language?  Our question is to learn editing in the R editor.  While typing in the R-editor, how can we make changes if we typed something wrong in the previous lines of the program.  How to save and reload a program in R?  Your help will be appreciated.  With best regards,  Sarjinder [[alternative HTML version deleted]]
2008 Jan 27
2
maptools no such file
Hello, I'm having problems reading a shapefile with read.shape (maptools). I'm absolutely sure my file is there, but I get "no such file". The wd is ok, since read.table for example does find the file. > getwd() [1] "D:/somedirectory/R scripts" > read.table("cities.shp") Error in read.table("cities.shp") : empty beginning of file In addition:
2007 Nov 20
2
barplot problem
Hello, I'm trying to find out how I can move the y axis label of a horizontal barplot further away from the axis, in order to avoid overlap between the names (which I have rotated using las=1) and the label. I have been fiddling with the graphical parameters but nothing seems to work. Maybe a graphical representation of the graphical parameters would be helpful (cf the CSS box model).
2006 Mar 09
2
How to assign channels for asterisk
helleo ,I have one wildcard installed on the server,and configured it.there are two modules which both FXOs .all configurations complete,and when we start asterisk use "asterisk -vvvvc",it shows asterisk ready,no warnings.afterwards when the sever connected to the PSTN in the one port which configured,and have a phone line connected to the other port then run
2007 Aug 18
1
number precision
Hi, I'm trying to find a way to determine how many digits a number has. I tried using nchar(paste(number)), but unfortunately paste will reduce 8.00 to "8". Any thoughts? Pieter -- This message was sent on behalf of pieterprovoost at gmail.com at openSubscriber.com http://www.opensubscriber.com/messages/r-help at stat.math.ethz.ch/topic.html
2007 Dec 24
1
curve fitting problem
I'm trying to fit a function y=k*l^(m*x) to some data points, with reasonable starting value estimates (I think). I keep getting "singular matrix 'a' in solve". This is the code: ox <- c(-600,-300,-200,1,100,200) ir <- c(1,2.5,4,9,14,20) model <- nls(ir ~ k*l^(m*ox),start=list(k=10,l=3,m=0.004),algorithm="plinear") summary(model) plot(ox,ir) testox <-
2013 Apr 11
2
Read the data from a text file and reshape the data
I have a data set for different time intervals. The data has three comment lines before data for each time interval. For each time interval there are 500 data points. I want to change the dataset such that I have the following format: t1 t2 t3 ................ 0.00208 0.00417 0.00625 ................. a1 a2 a3 ...................
2009 Jan 18
1
auto.arima forecasting issue
Hello everybody! I'm having this problem with the auto.arima function that i've not been able to solve. I use this function on time series that contains NA values, but every time that the resulting model contains drift I can't perform a forecasting (using forecast.Arima function). The printed error (when I try to forecast the resulting model) claims a dimension mismatch
2009 Jun 25
2
variable driven summary of one column
Hello, how can I get a variable driven summary of one column of my data.frame? Usually I would do > summary(data$columnname) to get a summary of column named "columnname" of my data.frame named "data". In my case the columnname is not static but can be set dynamically. So I save the chosen columname in something like variable <- "columnname" but how can I
2008 Jul 01
2
how to automatically maximize the graph window (under XP) ?
Hello, I'm trying to produce graphs automatically from data stored in database. Before saving the graphs, I would like to maximize the size of the graphs. The best would be to directly open maximized windows with x11() but up to now I failed doing it. I tried different widths and heighs but I never managed to obtain a full screen window. Is there a command to do it ? Thanks in advance, Ptit
2009 Sep 30
1
How to calculate KMO?
Hi All, How do i calculate KMO for a dataset? *Dataset:---------------------* m1 m2 m3 m4 m5 m6 m7 m8 1 2 20 20 2 1 4 14 12 2 9 16 3 5 2 5 5 15 3 18 18 18 13 17 9 2 4 4 7 7 2 12 2 11 11 11 5 7 8 5 19 5 2 20 18 6 7 4 7 4 7 9 3 3 7 5 5 5 12 5 13 13 12 8 6 6 4 3 5 17 17 16 9 12 12 4 2 4 4 14 14 10 5 14
2012 Aug 28
1
don't print object attributes
Dear all Suppose the object below: > require(Hmisc) > require(plyr) > x <- dlply(iris, .(Species), describe) How can I print the object without displaying the attributes? I inspected ?print and ?print.default with no luck. > x $setosa x[, "Sepal.Length"] n missing unique Mean .05 .10 .25 .50 .75 50 0 15 5.006 4.40 4.59