similar to: force apply not to drop the dimensions of FUN results ?

Displaying 20 results from an estimated 1000 matches similar to: "force apply not to drop the dimensions of FUN results ?"

2011 Jan 20
4
puzzled with plotmath II
sorry, I forgot my sessionInfo: please see below. -------- Original Message -------- Subject: puzzled with plotmath Date: Thu, 20 Jan 2011 12:48:18 +0100 From: Claudia Beleites <cbeleites at units.it> To: R Help <r-help at r-project.org> Dear all, I'm puzzled with matrix indices in plotmath. I'm plotting matrix elements: Z [i, i], and I'd like to put that as label.
2010 Oct 28
2
R and Matlab
Dear Group, I am looking for ways to use R and Matlab. Doing the data transformations in R and using the data in Matlab to analyze with some pre-defined scripts. Any good ways to transfer the data into matlab in its most recent version? I tried using R.matlab but the writeMat output is not readable by Matlab. I just need to output a data.frame and read it as is into matlab where I can do any
2011 Feb 18
6
sort a 3 dimensional array across third dimension ?
I'm attempting to sort a 3 dimensional array that looks like this > x , , 1 [,1] [,2] [1,] 9 9 [2,] 7 9 , , 2 [,1] [,2] [1,] 6 5 [2,] 4 6 , , 3 [,1] [,2] [1,] 2 1 [2,] 3 2 Such that it ends up like this .... > y , , 1 [,1] [,2] [1,] 2 1 [2,] 3 2 , , 2 [,1] [,2] [1,] 6 5 [2,] 4 6 , , 3 [,1] [,2]
2008 Nov 03
1
Fourier Transform with irregularly spaced x
Dear all, I work with (vibrational) spectra: some kind of intensity (I) over frequency (nu), wavelength or the like. I want to do fourier transform for interpolation, smoothing, etc. My problem is that the spectra are often irregularly spaced in nu: the difference between 2 neighbouring nu varies across the spectrum, and data points may be missing. Searching for discrete fourier transform
2010 Oct 12
1
need help with nnet
HI, Dear R community, My data set has 2409 variables, the last one is response variable. I have used the nnet after feature selection and works. But this time, I am using nnet to fit a model without feature selection. I got the following error information: > dim(train) [1] 1827 2409 nnet.fit<-nnet(as.factor(out) ~ ., data=train, size=3, rang=0.3, decay=5e-4, maxit=500) # model
2008 Dec 22
2
... (dotMethods) and cbind/rbind: how to give the signature?
Dear List, I'm struggling with the signature writing cbind/rbind functions for a S4 class. First of all, I'm very happy that it is now possible to dispatch on ... I follow the example for "paste" in ?dotMethods, which works as far as this: ### start example setClass ("cbtest", representation = representation (data = "data.frame"),
2010 Nov 12
1
Xapply question
Dear list, I'm stuck with looking for a function of the *apply family, which I suppose exists already ? just I can't find it: What I'm looking for is somewhere between sweep and mapply that does a calculation vectorized over a matrix and a vector: It should work complementary to sweep: for each row of the matrix, a different value of the vector should be handed over. Close to
2010 Mar 12
2
Data frame question
Hi, I have the following question about creating data frames. I want to create a data frame with 2 components: a vector and a matrix. Let me use a simple example: y <- rnorm(10) x <- matrix(rnorm(150), nrow=10) Now if I do dd <- data.frame(x=x, y=y) I get a data frame with 16 colums, but if, according to the documentation, I do dd <- data.frame(x=I(x), y=y) then str(dd)
2010 Aug 17
1
prompt () and backticks for default arguments
Dear all, I just noticed, that prompt () looses backticks that protect default arguments: f <- function (FUN = `*`) {} cat (prompt (f, NA)$usage) yields: \usage{ f(FUN = *) } %- maybe also 'usage' for other objects documented here. without the backticks, which is of course found by R CMD check as syntax error. While this is easily fixed if the .Rd is further edited manually, I
2008 Dec 22
2
methods vs. functions
Dear List, a second, more general, question concerning S4 classes. I have a bunch of functions/methods for my class. At the moment I have them as methods, because they work on objects of my S4 class and therefore "belong" to that class. On the other hand, it is comparably unlikely that someone else wants the same kind of method. And package.skeleton () produces the
2010 Aug 25
3
approxfun-problems (yleft and yright ignored)
Dear all, I have run into a problem when running some code implemented in the Bioconductor panp-package (applied to my own expression data), whereby gene expression values of known true negative probesets (x) are interpolated onto present/absent p-values (y) between 0 and 1 using the *approxfun - function*{stats}; when I have used R version 2.8, everything had worked fine, however, after updating
2010 Feb 28
1
dots for sample
Dear R-Developers, could 'sample' gain a ... argument? As a convenience function, I added a sample Method to my hyperSpec class. This function however has a flag indicating whether the results should be returned directly as a hyperSpec object or rather as indices that give a random sample. For the moment, I use SetGeneric to add the dots argument, but this of course gives a warning
2010 Oct 05
3
SweaveInput + keep.source = TRUE trouble
Dear all, I have trouble with R-beta sweaving files that include definitions with \SweaveInput in combination with keep.source = TRUE Symptom: SInput is taken from too far down the input file (the shift is the number of lines of the included file). Is that known? Searching didn't turn up anything, yet I think there are more people than just me using keep.source. Example: $
2010 May 24
2
ROC curve
HI, Dear R community, I want to know how to select the optimal decision threshold from the ROC curve? At what threshold will give the highest accuracy? Thanks! -- Sincerely, Changbin -- [[alternative HTML version deleted]]
2013 Apr 24
2
[LLVMdev] Another missed optimization opportunity?
On 04/24/2013 01:29 PM, Caldarale, Charles R wrote: > Is this a potential aliasing effect? Since myarray is defined as a pointer, not an array, it's theoretically possible that the address therein refers to the same memory location as the pointer itself. I was thinking along those lines, but I haven't been able to come up with a specific instance of what could possibly be aliased.
2013 Apr 24
8
[LLVMdev] Another missed optimization opportunity?
I was suprised to find that some bitcode I'm generating isn't getting optimized. Here, I'm doing the equivalent of "myarray[5]++" (on an "extern int *myarray"), repeated three times: @myarray = external global i32* define void @update_array() #0 { %1 = load i32** @myarray, align 8 %2 = getelementptr inbounds i32* %1, i64 5 %3 = load
2006 Jan 16
3
new comer's question
I am new to R. I try to search the web but could not find the answer so I post it here asking for help. I have a csv file looks like this: (between two ==== lines) =========================== Machine Name,"Resource, Type","Resource, Sub-type","Resource, Instance",Date,,Data ->,,,,,, ,0.041666667,,,,,,,,,,, Time (HH:MM)
2008 Feb 13
2
[Linux/Python 2.4.2] Forking Python doesn't work
Hello When a call comes in, I'd like to fork a Python script that broadcasts a message so that users see the CID name + number pop up on their computer screen, and simultaneously ring their phones. The following script doesn't work as planned: It waits until the script ends before moving on to the next step, which is Dial(): =========== exten =>
2009 Jun 19
1
Shell Script: Simple array usage = bad substitution?
Hey Guys n Gals; I have some arrays that I can't seem to expand correctly (if that's the correct word?), imagine the following example: #!/bin/bash myArray=("First" "Second" "Third") First=("Monday" "Tuesdays" "Wednesday") Second=("One" "Two" "Three") Third=("A" "B"
2013 Apr 24
0
[LLVMdev] Another missed optimization opportunity?
Hi Scott, On 24/04/13 19:40, Scott Pakin wrote: > I was suprised to find that some bitcode I'm generating isn't getting > optimized. Here, I'm doing the equivalent of "myarray[5]++" (on an > "extern int *myarray"), repeated three times: does your bitcode contain data layout information? Ciao, Duncan. > > @myarray = external global i32* >