similar to: Data frame question

Displaying 20 results from an estimated 2000 matches similar to: "Data frame question"

2007 Oct 16
1
data structure for plsr
All, I am working with NIR spectral data and it was great to find that the example in ?plsr also used spectral data. Unfortunately, I am having difficulty figuring out how the "yarn" dataset is structured to allow for the plsr model to read: library(pls) data(yard) yarn.oscorespls <- mvr(density ~ NIR, 6, data = yarn, validation = "CV", method = "oscorespls")
2012 Oct 07
3
what exactly is the dim of data set yarn in package "pls"?
Hi list, I am looking at the data yarn in package, I don't understand what is dimension of this data set. I did the following: > library(pls) > data(yarn) > dim(yarn) [1] 28 3 > head(yarn) NIR.1 NIR.2 NIR.3 NIR.4 NIR.5 NIR.6 NIR.7 NIR.8 NIR.9 NIR.10 NIR.11 1 3.06630 3.08610 3.10790 3.09720 2.99790 2.82730 2.62330 2.40390 2.19310 2.00580 1.83790 2
2009 Jun 30
1
please help me about data format.
Hi~ helpers. I was surprised by R data type. I use to data type like table. I don't know R allow several data type such as list, number, matrix in the same matrix. I want to use plsr in pls package to anlaysis data. So, I read R help and example of plsr. that example show me that data as yarn has three colname as NIR, density and train. the NIR was 268(No. of col) X 71(No. of row)
2008 Jul 01
1
Help in using PCR
Hi, Currently I have a dataset of 2400*408. And I would like to apply PCR method to study the any correlation between the tests. My current data is in data.frame and I have formed horizontal(1-407) to be the exact data, and (408) to be my results data(Yes and No) I have also binarized these Yes and No to 1 and -1s. However, when I refer to PCR manual on R, the example of yarn.pcr <-
2013 Jul 13
1
Alternative to eval(cl, parent.frame()) ?
Dear developeRs, I maintain a package 'pls', which has a main fit function mvr(), and functions plsr() and pcr() which are meant to take the same arguments as mvr() and do exactly the same, but have different default values for the 'method' argument. The three functions are all exported from the name space. In the 'pre namespace' era, I took inspiration from lm() and
2007 May 30
2
matrix in data.frame
Dear list! I have run into a problem that seems very simple but I can't find any solution to it (have searched the internet, help-files and "An introduction to R" etc without any luck). The problem is the following: I would like to create a data.frame with two components (columns), the first component being a matrix and the second component a vector. Whatever I have tried so far, I
2011 Jun 27
2
R PLS package data format
Dear sir, If I have a vector as: >y <- c(1:4) and a matrix as: >x <- matrix (5:12, nrow=4, ncol=2) Then I create a data frame as: >t <- data.frame(y, x) R will generate a data frame of 3 columns >names(t) > "y" "X1" "X2" >is.vector(t$X1) returns TRUE > is.vector(t$X2) returns TRUE R splits the columns of a matrix into column vectors
2012 Oct 28
6
Having some Trouble Data Structures
Hi All, I'm trying to run a simulation of host-pathogen evolution based around individuals. What I need to have is a dataframe or table of some description - describing all the individuals of a pathogen population (so far I've implemented this as a matrix): ID No_of_Effectors Effectors (Sequences) [1,] 0001 3 ## 3
2009 May 08
1
What package I use to draw 3D plot after plsda?
Hi. I was used to draw 2D plot to show distribution of my samples. It was very powerful in small samples. Recently , I handle a lot of type of samples as more 15. so, I want to use more dimention. I was used that I conduct plsda function and draw biplot, such as, p1=plsda(mw, sp) biplot(p1) How can I draw 3D graph with my data?? I don't know exactly numerical value each spot. please,
2010 Nov 10
2
force apply not to drop the dimensions of FUN results ?
Dear R users, Here is my problem: I have an array with at least four dimensions: > dim(myArray) [1] 20 17 3 6 I'd like to apply a function to each occurrence of the matrix (3x6) defined by the last two dimensions. This interpolation function always return a matrix of the same dimensions as its argument: > interpSecteurs.f(myArray[1, 1, , ]) secteur rotation 1 2 3
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.
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]
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
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"),
2001 Jul 24
3
strange slowness of plot
I just ran into this strange behavior. y <- rnorm(1000) x <- seq(0, length=length(y)) plot(x, y, type='l', lty=1) - instantaneous plot(x, y, type='l', lty=2) - 18s plotting lines + 15s plotting axes = 33s plot(x, y, type='l', lty=3) - 76s ,, + 75s ,, = 151s plot(x, y, type='l', lty=4) -
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
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 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 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