similar to: List of arrays - problem with dimensions

Displaying 20 results from an estimated 10000 matches similar to: "List of arrays - problem with dimensions"

2012 Oct 02
2
Problem with mutli-dimensional array
I want to make a multi-dimensional array. To be specific I want to make the following array results<-array(0,dim=c(2,2,64,7)) This is the code I have created but it gives no result due to the error "subscript out of bound". x<-rep(7,7) # Missingness in intervention y<-rep(7,7) # Missingness in control
2012 Sep 26
1
Creating x*y different contigency tables
Dear all, I am trying to construct 25x31 different matrices of 2x2 dimension. Here is the problem: we have the following matrix matrix(c(54+s0, 43+s1, 56-s0, 67-s1), nrow=2, ncol=2, byrow=T) the values for s0 and s1 are c(0:24) and c(0:31), respectively. I wrote the following code without the desired results
2012 Oct 23
5
List of multidimensional arrays
Dear all, I am trying to create a list, where each list element is a vector of different length arrays that contain 2by2 matrices. To be more specific there are 11 treatments that are compared with placebo (we have 11 comparisons) and each comparison is studied by a different number of trials and each trial has a different number of missing participants in both arms. The length of the list is
2012 Oct 04
3
Problem with colors in contour plot
Dear R users, I have a 51 by 51 matrix of p-values (named as pvalue_MA). I want to present graphically this matrix in a plot (filled contour plot) where both axes represent probabilities. I have also added a grid in this plot. I want to highlight in white the cells of the grid that represent p-values smaller than the (common) significance threshold, 0.05. The code from this plot is colored in
2012 Nov 08
1
A panel of contour plots through a iteration process
Dear all, as you can see from the code I want to create *a panel of 11 contour plots through a iteration process*. I found a thread that address the issue of plotting many contour.plots in the same device, but it does not address my problem! I emphasize that the 11 contour plots must be appeared in the same device through an iteration process and NOT individually! par(mfrow=c(4,3)) # I want them
2012 Jul 13
1
integrating multi-dimensional dat along one dimension
I just want to integrate a 3D data set along one dimension to obtain a 2D data set. Something like: (given array "d" with dim nx,ny,nz ...) data_int<-array(dim=c(nx,ny)) for (n in 1:ny) { for (m in 1:nx) { data_int[m,n]<-sum(d[m,n,]) } } The thing is, given R's facility with integers, it seems that I should be able to obtain data_int without the
2000 Mar 22
4
density ellipses?
Hello, has anybody written a function to plot density ellipses (95%, 99% or anything) in a scatterplot? I found nothing in any package, nor in the list archives. There does seem to be a contributed package "ellipse" for S-Plus (on S-Archive), but it does a lot more than what I would need. Still, if anybody ported it to R, I'd be grateful for a link. I'm a bit afraid to try the
2011 Dec 15
2
lm and R-squared (newbie)
Hello, I've two data.frames (data1 and data4), dec="." and sep=";". http://r.789695.n4.nabble.com/file/n4199964/data1.txt data1.txt http://r.789695.n4.nabble.com/file/n4199964/data4.txt data4.txt When I do plot(data1$nx,data1$ny, col="red") points(data4$nx,data4$ny, col="blue") , results seem very similar (at least to me) but the R-squared of
2010 Oct 01
1
colored rasterImage()
Hello, I have been exploring the possibility to transition some code that currently uses image() to use the new rasterImage(). To date, I haven't been able to specify a color look-up strategy that works. For example... nx <- 100 ny <- 100 m <- matrix(data = rep(seq(0,1, length = nx), ny), ncol = nx, nrow = ny, byrow = TRUE) plot(1:nx, 1:ny, type = "n") my.color
2006 May 14
1
Dragable element
Hey all Im having a problem... Ok, this is the situation... I have a small product image, on which ive floated a div over it, and defined it as draggable. Now, this works, and i can drag it around no problem. great. but then, what i want to do is, based on the location of that dragable element from the top and the left, to move (using the Effect.MoveBy method) a larger image - so effective
2008 Mar 16
1
stats/debugging question hotelling t-sq
Hi I spent hours looking over my formula. Somehow I cant find the reason why it gives me different answer. help appreciated. x = as.matrix(read.table("http://www.niehs.nih.gov/research/atniehs/core/microarrays/docs/heinloth.txt",1)) x = t(x) #now rows are subjects, cols are genes x = x[order(rownames(x)),] #order by treatment group oxygen, ultra-violet, gamma radiation y =
2004 Feb 14
6
Beginner's question about t.test()
Dear All, I am doing some exercise in statistics textbook on comparison of two experimental means. Is it possible to use t.test() do t-test when I have only two means, sample size, two standard deviations ? (no raw data). Thanks. Pramote
2007 Dec 11
1
R computing speed
Dear helpers, I am using R version 2.5.1 to estimate a multinomial logit model using my own maximum likelihood function (I work with share data and the default function of R cannot deal with that). However, the computer (I have an Athlon XP 3200+ with 512 GB ram) takes quite a while to estimate the model. With 3 categories, 5 explanatory variables and roughly 5000 observations it takes 2-3 min.
2001 Oct 17
2
File reading.
Hi all, Appologies for the rather basic IO question but I am rather new to R... Migrated from IDL/Matlab recently. I have a rather simple Fortran control file (sigh...) that I am trying to parse and read using R. My problem is that the file's format is somewhat flexible. Imagine: --- 1> 39 1901 2> 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3> 22 24 26 28 30 32 34 36
2005 Mar 23
1
interp.surface() error (PR#7745)
R version: 2.001 OS: Windows XP SP2 When I use the interp.surface() function, on occasion I have encountered the following error message: Error in interp.surface(a, loc) : subscript out of bounds Since it is somewhat dependent on the data set, I cannot say exactly in which cases these occur, but I believe I have found the problem and a solution for it: The scaling calculations in the code,
2006 Apr 28
2
How to get a grid behind a boxplot
I am using R 2.2.1 on a Windows 2000 PC. When I do a grid() after the boxplot it overprints the boxplot: > boxplot(count ~ spray, data = InsectSprays, col = "lightgray") > grid(nx=NA, ny=NULL) > if I try the panel.first > boxplot(count ~ spray, data = InsectSprays, col = "lightgray", + panel.first=grid(nx=NA, ny=NULL)) > I can see the grid flash
2003 Jan 22
1
something wrong when using pspline in clogit?
Dear R users: I am not entirely convinced that clogit gives me the correct result when I use pspline() and maybe you could help correct me here. When I add a constant to my covariate I expect only the intercept to change, but not the coefficients. This is true (in clogit) when I assume a linear in the logit model, but the same does not happen when I use pspline(). If I did something similar
2006 Mar 15
1
How to compare areas under ROC curves calculated with ROCR package
Dear all, I try to compare the performances of several parameters to diagnose lameness in dogs. I have several ROC curves from the same dataset. I plotted the ROC curves and calculated AUC with the ROCR package. I would like to compare the AUC. I used the following program I found on R-help archives : From: Bernardo Rangel Tura Date: Thu 16 Dec 2004 - 07:30:37 EST
2020 Oct 23
2
3d plot of earth with cut
Dear All, Thanks a lot for the useful help again. I manage to get it done up to a point where I think I just need to apply some smoothing/interpolation to get denser points, to make it nice. Basically, I started from Duncen's script to visualize and make the clipping along a plane at a slice. Then I map my data points' values to a color palette and just plot them as points on this plane.
2011 Feb 04
2
Avoiding two loops
Hello, I have a R code for doing convolution of two functions: convolveSlow <- function(x, y) { nx <- length(x); ny <- length(y) xy <- numeric(nx + ny - 1) for(i in seq(length = nx)) { xi <- x[[i]] for(j in seq(length = ny)) { ij <- i+j-1 xy[[ij]] <- xy[[ij]] + xi * y[[j]] } } xy } How do I reduce the 2