similar to: sweep?

Displaying 20 results from an estimated 5000 matches similar to: "sweep?"

2007 Jun 29
1
sweep sanity checking?
A friend of mine just got bitten by the fact that sweep() will happily sweep out a STATS vector of an arbitrary length -- even one whose length is not a divisor of any of the margins -- without complaining. I know the answer to this could be "well just don't do that", but it's easy to make a mistake in which margin you're sweeping ... What would R-core think of the
2010 Oct 19
2
head.matrix() unintelligent
Hi Just a simple question really. I?ve got these large 2d matrices that I?d like to inspect, but not from start to finish. The head() command is convenient when columns are few. For large nxn matrices, however, head() and head.matrix() are still cumbersome. Is there a simple way of viewing both the columnwise and rowwise heads of a matrix? cheers, Bruce -- View this message in context:
2005 Jun 20
6
sweep() and recycling
Hi I had a hard-to-find bug in some of my code the other day, which I eventually traced to my misusing of sweep(). I would expect sweep() to give me a warning if the elements don't recycle nicely, but X <- matrix(1:36,6,6) sweep(X,1,1:5,"+") [,1] [,2] [,3] [,4] [,5] [,6] [1,] 2 9 16 23 30 32 [2,] 4 11 18 25 27 34 [3,] 6 13 20 22
2011 Oct 22
7
"Plotting" text?
I noticed that the text() command adds text to a plot. Is there a way to either make the plot blank or add text to a "blank sheet". I would like to "plot" a page that contains just text, no plot lines, labels, etc. Suggestions? Kevin [[alternative HTML version deleted]]
2008 Oct 10
2
Leap year?
Given a Date object or simply a year is there an R function to tell me if the it is a leap year or not? I was hoping for something like 'is.leapyear'. I probably can build my own function (year divisible by 4 etc.) but I would rather use an existing function if it is available. Thank you. Kevin
2008 Aug 28
6
Function not returning a vector?
Why does: (shape/scale) * (1:365/scale)^(shape - 1) return a vector of numbers but calling a function hasard(1:365,shape,scale) defined like: hazard <- function(x,shape,scale) { return (shape/scale) * (x/scale)^(shape - 1) } Only return a single value? It is like x becomes a single value passed as an argument. Thank you. Kevin
2011 Sep 06
2
subsetting tables
Hi guys, one of the questions where you need a real human instead of a search engine, so it would be great if you could help. I have a matrix of z-scores which I would like to filter, sometimes columnwise, sometimes rowwise. Data looks like this: Allstar hsa.let.7a hsa.let.7a.1 hsa.let.7a.2 2 0.87 0.79 -0.57 1.07 3 0.67 -1.14 -0.78 -0.95 4
2010 Mar 22
2
Factors attribute?
I noticed that when I fit a linear model using 'lm' there is an attribute called "factors" that is added to the "term". It doesn't seem to appear for 'model.matrix', just 'lm'. I have been unable to find where it gets constructed or what it means? It looks like a two dimensional array that I may be able to use so I would just like to get some
2009 Jan 03
5
Power functions?
I had a question about the basic power functions in R. For example from the R console I enter: -1 ^ 2 [1] -1 but also -1^3 [1] -1 -0.1^2 [1] -0.01 Normally pow(-1, 2) return either -Infinity or NaN. Has R taken over the math functions? If so I would think that -1^2 is 1 not -1 and -0.1^2 is 0.01 not -0.01. Thank you. Kevin
2011 Nov 07
3
Upgrade R?
I am trying to upgrade to R 2.14 from R 2.13.1 I have compied all the libraries from the 'library' directory in my existing installation (2.13.1) to the installed R 2.14. Now I want to uninstall the old installation (R 2.13.1) and I get the error: Internal Error: Cannot find utCompiledCode record for this version of the uninstaller. Any ideas? Kevin [[alternative HTML
2012 Aug 04
1
how to coerce the result of sweep to be an array if result of FUN is a string?
Hi, I would like to use sweep to "sweep out" proportions and confidence intervals for an array, however when I supply a function which returns a string (containing something like "9% (3-18%)") I get back a list instead of an array, here is a simplified example: # example showing that sweep does not return an array with same dimensions as STATS as advertised
2002 Sep 25
2
Weekly machine password changes (RE: RE: odd: everything SHOULD work... winbind)
No big surprise there. :) I'm still trying to figure exactly what goes on with the machine password changing around. Who initiates this? nmbd? The PDC? Who's notified of this change, and what's going on there. Perhaps someone can shed some light? -- Nir Soffer -=- Software Engineer, Exanet Inc. -=- "Father, why are all the children weeping? / They are merely crying son O, are
2009 Oct 28
5
PDF Corrupted?
I am running R 2.9.2 and creating a PDF that I am trying to open with Adobe Reader 9.2 but when I try to open it the reader responds with "There was an error opening this document. The file is damaged and cannot be repaired.: I am using the R command(s): pdf(file="cat.pdf", title="Historical Sales By Category") for(j in 1:length(master)) { d <-
2004 Aug 06
1
preliminary Speex support in Sweep
Hi Jean-Marc and others, I put Speex support in Sweep (a sound editor) yesterday, and had some fun with it :) I'd like to get some feedback before releasing it publically. I'm not really used to speech codecs (I work more with music) but I've been quite impressed at the file size and quality (especially when you hear what I did with some of the sample files ;) I didn't have any
2008 Aug 03
2
Determining model parameters
This may be a begining question. If so, please bear with me. If I have some data that based on the historgram and other plots it "looks" like a beta distribution. Is there a function or functions within R to help me determine the model parameters for such a distirbution? Similarily for other "common" distirbutions, Poisson(lambda), Chi-Square(degrees of freedom, chi-square
2010 Jan 03
3
F77_CALL, F77_NAME definition
I give up. Maybe it is my search (Windows) but I cannot seem to find the definition of the F77_CALL or F77_NAME macros. Either there are too many matches or the search just doesn't find it. For example where is the source for: F77_CALL(dpotri) ? Thank you. Kevin
2008 Jul 15
4
Iterations
I have a command that reads in some data: x <- read.csv("Sales2007.dat", header=TRUE) Then I try to organize the data: sc <- split(x, list(x$Category, x$SubCategory), drop=TRUE) Then I want to iterate through the data. I was able to get the following to run on the R console: for(i in 1:length(sc)) { sum(sc[[i]]$Quantity) } But notiing is primted on the console. I find
2010 Oct 08
3
Import Multiple csv files and merge into one Master file
Dear R Group: How to import multiple csv files and merge into one dataset. Thanks and Regards, Xing [[alternative HTML version deleted]]
2009 Oct 27
3
Non-normal residuals.
Hello, I asked a question about what the most likely process to follow if after a time-series fit is performed the residuals are found to be non-normal. One peron responded and offered to help if I supplied a sample data set. Unfortunately now that I have a sample I have lost the emai addressl. If you are that person or have some ideas please email me back at rkevinburton at charter.net. Thank
2008 Oct 07
4
sort a list?
I am trying to sort a list and the data is obiously not in the right format. I am trying: x <- list() x[["A"]] <- 1 x[["B"]] <- 2 order(x) But am getting: Error in order(x) : unimplemented type 'list' in 'orderVector1' How should I change the list so that it can be sorted? What kinds of objects (classes of objects) can be sorted? Thank you. Kevin