search for: dimensions

Displaying 20 results from an estimated 3690 matches for "dimensions".

Did you mean: dimension
2007 Oct 08
7
belongs_to association doesn't work with _id set
Hello there, I''m developing an application which has models like this: class Vehicle < ActiveRecord::Base belongs_to :internal_dim, :class_name => "Dimension" def before_create() idim = Dimension.create self.internal_dim_id = idim.id #self.create_internal_dim # Doesn''t work end end class Dimension < ActiveRecord::Base
2013 Jun 07
4
matched samples, dataframe, panel data
I R-helpers #I have a data panel of thousands of firms, by year and industry and #one dummy variable that separates the firms in two categories: 1 if the firm have an auditor; 0 if not #and another variable the represents the firm dimension (total assets in thousand of euros) #I need to create two separated samples with the same number os firms where #one firm in the first have a corresponding
2017 Jul 14
3
Making 2 dimensional vector from the 3 dimensional one
Hi All, I want to make a 1 dimension vector from the first two dimensions of a 3 dimension array, so make a 2 dimension vector from a 3-dimension one, with "fusing" (making as.vector) the first two dimensions. It seems to be very easy, but I cannot find the solution, I mean it would very strange, that I would do taking the single 1 dimensional vectors from the...
2010 Apr 18
3
xtabs() of proportions, and naming a dimension (not a row)
Hi, xtabs() creates a table of counts. I want a table of proportions -- that is, I want to divide every vector (along a particular dimension) by its sum. The tiny example below does that. The call to xtabs() creates a matrix "A" with dimensions ("x1","x2","y"). I transform "A" using aperm() and aaply() to get the matrix "B". The problem: "B" has dimensions (<No name>, "x2", "x1"). How can I give (back) the name "y" to the dimension with no n...
2007 Dec 18
4
accessing dimension names
I have a matrix y: > dimnames(y) $x93 [1] "1" "2" $x94 [1] "0" "1" "2" .................. so on (there are other dimensions as well) I need to access a particular dimension, but a random mechanism tells me which dimension it would. So, sometimes I might need to access dimnames(y)$x93, some other time it would be dimnames(y)$x94.. and so on. Now let that random dimension be idx, then dimnames(y)$paste('x',idx,...
2006 Jul 27
2
Vector extracted from a matrix. How can I specify dimensions in as.matrix?
...s.vector does not give the what I want (still NULL) and as.matrix can't specify the number of row and columns so both vectors are vertical. In this example, I extract a column and a row. Notice that both as.matrix(vector) have the same dimension. Notice that both transposed vectors have 1x3 dimensions. initialmatrix <- matrix(1:9,3,3) extractedvector3x1 <-initialmatrix[,1] # extract first columm as vector extractedvector1x3 <-initialmatrix[1,] # extract first row as vector #Both are NULL dim(extractedvector3x1) #NULL!!!! dim(extractedvector1x3) #NULL!!!! #transposed dimensions both...
2012 Aug 16
3
r data structures
hi, i'm trying to understand r data structures. i see that vectors, matrix, factors and arrays have a "dimension." there seems to be no mention of dimensionality anywhere for lists or dataframes. can i consider lists and frames to be of fixed dimension 2? thanks, jay s
2006 Oct 19
2
arraytake for extracting subarrays from multidimensional arrays
Hi, I recently encountered a problem with array subsetting and came up with a fix. Given an array of arbitrary dimensions, in which the number of dimensions is only known at runtime, I wanted to extract a subarray. The main issue with doing this is that in order to extract a subarray from an array of (say) 4 dimensions you usually specify something like this a.subarray <- a[,c(4,2),1:5,] However, if your code nee...
2017 Jun 01
5
Reversing one dimension of an array, in a generalized case
...ified idea is I have an array, say: junk(5, 10, 3) where (5, 10, 3) give the dimension sizes, and I want to reverse the second dimension, so I could do: junk1 <- junk[, rev(seq_len(10), ] but what I am after is a general function that will do that where the array could be two, three or four dimensions, and I pass to the function which dimension I want to reverse, that is the function can not assume the number of dimensions of the array nor which dimension to reverse. For example, if i try: junk1 <- apply(junk, 2, rev) junk1 comes out as two-dimensional, not three-dimensional. It is pro...
2008 Mar 01
2
Newbie: Incorrect number of dimensions
....sub),50))*2 diff<- mt.rawp2adjp(two_side) all_differ<-diff[[1]][37211:10000,] all_differ #####list of differentially expressed genes########## > probe.names<- + all_differ[[2]][all_differ[[1]][,"BY"]<=0.01] Error in all_differ[[1]][, "BY"] : incorrect number of dimensions Hi, I am pretty new with R. What i am trying to do is to find all differentially express genes and list of differentially expressed genes. Am i doing something wrong? I keep getting incorrect number of dimensions. How do i find out the correct dimensions? thanks, Keizer -- View this message...
2003 Aug 24
2
setClass question
I would like to add a class to the SparseM package. I have a class "matrix.csr" that describes a matrix in compressed sparse row format, now I would like a class matrix.diag.csr that describes such objects when they happen to be diagonal. The idea is that matrix.diag.csr objects should behave (later in life) exactly like matrix.csr objects, the distinction is only needed in order to
2003 Oct 31
4
Array Dimension Names
I would like to reference array dimensions by name in an apply and a summary function. For example: apply(x, "workers", sum) Is there a better way to do this than creating a new attribute for the array and then creating new methods for apply and summary? I don't want to name the individual elements of each dimension (such...
2006 Apr 07
4
reading mpeg4 dimensions and flv dimension using ruby
Hey guyz, Well basically what i am trying to do is get ruby to read my video files in so that i can get the dimensions of the video and then place the dimension sizes in my view. The two formats i need to do this with are mpeg4 (h.264) and FLV. Is there anyway i can get rails to access the metadata of these formats and pull the dimensions from the metadata? Any help would be greatly appreciated. Thank you, --...
2016 Apr 24
2
How to take a multidimensional data set to higher dimensions using R?
...a multidimensional data-set( multiple 'x' variables with a target variable). I want to take it to a higher dimensional space so that I can apply classification technique with ease . Is there a package in R which would allow me to take these data points from lower dimensional space to higher dimensions? so that is that higher dimension I can apply classification techniques to be effective. My datapoints are highly inseperable in lower dimension so i want to take the data points to higher dimension where they can be separable( something similar to kernel trick) -- Warm regards, Devesh. [[alter...
2009 Jul 08
3
Suggestion: Dimension-sensitive attributes
Hi, I agree with Henrik that his suggestion to have "dimension vector attributes" working like dimnames (see below) would be an extremely useful infrastructure adittion to R. If this is not considered for R-core, I am happy to try to implement this in a package, as a new class. And possibly do the same thing for data frames. Should you have any comments, ideas or suggestions about it,
2008 May 02
2
mosaic plot of "vcd" package does not stretch with 2-dimension?
Hi, I like mosaic function of "vcd" package. I have played around it. I have found out that mosaic plot data table is 2-dimension does not stretch when you enlarge a mosaic plot. It is okay when data table is 3 or more dimension. The first one is of 3-dimension table case, and the second one is 2-dimension. With the first plot, you can drag window to enlarge a plot. With the
2013 Mar 09
1
get current plot dimensions?
Hi R users, I find par("pin") is kind of confusing (or maybe just me?). The manual said it will give " The current plot dimensions, ‘(width,height)’, in inches." The word "current" is the key here. I thought it would give the dimensions of the to-be plot, but it actually gives the dimension of the finished plot: > layout(matrix(c(1,2,3,4), nrow=2), width=c(1,3), height=c(1,3)) > par("pin") [1] 4...
2013 Jun 08
0
data
....table(file="real_data_cecilia.txt",sep="\t") dim(final3New) #[1] 5369??? 5 #Inside the split within split, dummy==1 for the first row.? For lists that have many rows, I selected the row with dummy==0 (from the rest) using the #condition that the absolute difference between the dimensions of those rows and the first row dimension was minimum (after I applied the first #constraint).? I guess you wanted to select only a pair of rows (dummy=0 and dummy=1) for each lists. fun1<- function(dat,percent,number){??? ??? lst1<- split(dat,list(dat$year,dat$industry)) ??? lst1New<- l...
2008 Oct 01
3
cryptic error message: "Error in embed(y, lag) : wrong embedding dimension"
Dear R Users, I've been hit with a cryptic error message: "Error in embed(y, lag) : wrong embedding dimension" My configuration is: - R 2.7.2 - Windows XP Sp2 Google returns nothing for this. Could someone suggest what this might mean ? Thanks in advance, Tolga Generally, this communication is for informational purposes only and it is not intended as an offer or solicitation
2012 Feb 13
3
mgcv: increasing basis dimension
hi Using a ts or tprs basis, I expected gcv to decrease when increasing the basis dimension, as I thought this would minimise gcv over a larger subspace. But gcv increased. Here's an example. thanks for any comments. greg #simulate some data set.seed(0) x1<-runif(500) x2<-rnorm(500) x3<-rpois(500,3) d<-runif(500) linp<--1+x1+0.5*x2+0.3*exp(-2*d)*sin(10*d)*x3