similar to: array subsetting of S4 object that inherits from "array"

Displaying 20 results from an estimated 100 matches similar to: "array subsetting of S4 object that inherits from "array""

2007 Jan 26
3
"[" operator and indexing ambiguity
Hi, I am working on writing some S4 classes that represent multidimensional (brain) image data. I would like these classes to support standard array indexing. I have been studying the Matrix and EBImage (http://www.bioconductor.org/packages/1.9/bioc/html/EBImage.html) packages to see how this is done. When using objects of the "array" class directly, R distinguishes between the calls:
2008 Jan 22
1
row-wise conditional update in dataframe
Hi! I need to conditionally update a dataframe field based on values in other fields and can't find even how to search for this right. Sorry if this has been asked before. But, specifically, I have a 490 X 221 dataframe and need to count, by row, how many fields in Dataframe$field_a...Dataframe$field_zz are non-null and enter this value in Dataset$ABCtaskNum. I have field name
2002 Jan 24
1
Re: coding factor replicates
How about this. Its not as 'swish' as Doug's response, but it might be a little simpler to think about and adapt... # show the test vector > tmp [1] A B C B C A C B A A B Levels: A B C > # create a named vector to store the number of occurences of each level > index <- numeric(length=length(levels(tmp))) > names(index) <- levels(tmp) > index A B C [1] 0 0
2001 Nov 28
3
trellis plot
Hi, I'd like to plot 4 groups of data using xyplot and panel.superpose so that the points are overlayed on a single plot. For each group of data I'd also like a loess smoothed function (using panel.loess). I have tried the following: xyplot(series ~ time | gr, data=etable, panel = function(x,y, ...) { panel.superpose(x,y, ...) panel.loess(x,y,span=.15)
2003 Jul 30
6
reverse array indexing
Hi, Suppose I have a multidimensional array: tmp <- array(1:8, c(2,2,2)) is there a function out there that, given a one-dimensional array index, will return the separate indices for each array dimension? for instance, tmp[8] is equivalent to tmp[2,2,2]. I'd like to derive the vector (2,2,2) from the index 8. thanks, Brad Buchsbaum
2010 Feb 25
3
variable substitution in for loops
Friends I can't quite find a direct answer to this question from the lists, so here goes: I have several dataframes, 200+ columns 2000+ rows. I wish to script some operations to perform on some of the variables (columns) in the data frames not knowing what the column number is, hence have to refer by name. I have variable names in a text file "varlist". So, something like this:
2010 Jun 09
1
generate list of variable names
Hi! Would anyone know how to generate a list of variable names from a data frame by the class of the variable? I have large tables with different numbers of columns and am trying to script some rote analyses. There are several categorizing variables (factors) and many response variables (integers and numeric). I want to extract a list of classifier column names in one list and response variable
2010 Feb 18
1
variable substitution
Hi I would like to write a script that reads a list of variable names. These variable names are some of the column headers in a data.frame. Then I want do a for-loop to execute various operations on the specified variables in the data.frame, but can't figure out how to do the necessary variable substitution. In bash (or C) I would use "$var", but there seems to be no equivalent in
2002 Apr 02
2
label tickmarks in persp()-plot
Dear R-users, is there a way to label the tickmarks other than persp does it? I didn't find anything on that in the archive. To plot the surface with equi-distant tickmarks, I assigned x<-c(1:6) y<-x persp(x,y,z,....) Instead of labels 1 to 6, I need something like 0.05, 0.1,10,15,100,1000. Any hint and help appreciated, Nina
2002 Jan 24
0
Re: coding factor replicates
> -----Original Message----- > From: Douglas Bates [mailto:bates at stat.wisc.edu] > Sent: Thursday, January 24, 2002 8:55 AM > To: Uwe Ligges > Cc: Brad Buchsbaum; r-help at stat.math.ethz.ch > Subject: Re: [R] Re: coding factor replicates > > Douglas Bates <bates at cs.wisc.edu> writes: > > > Uwe Ligges <ligges at statistik.uni-dortmund.de>
2002 Jan 23
6
multivariate simulation
To whom it may concern, I try to simulate a non-normal multivariate distribution. The MASS package allows by mean of "mvrnorm" command to perform a multivariate normal simulation. Is there an equivalent command for an arbitrary multivariate distribution available in the R-language? Thank you in advance. Bernard Colin Colin Bernard Professeur titulaire D?partement de Math?matiques et
1999 Dec 08
0
apparent fix for Solaris 7 compilation problems
Hi everyone, I'm new to the list... I was just assigned an Ultra60 with Solaris 7 to setup and tried to compile openssh-1.2pre16 with... "./configure --with-tcp-wrappers --with-egd-pool=/dev/entropy; make;" And here's where the compilation process failed... --------------------------------------------------------------------- gcc -g -O2 -Wall -I/usr/local/ssl/include
2010 Dec 09
4
lapply getting names of the list
Hello All, I have a toy dataframe like this. It has 8 columns separated by tab. Name SampleID Al1 Al2 X Y R Th rs191191 A1 A B 0.999 0.09 0.78 0.090 abc928291 A1 B J 0.3838 0.3839 0.028 0.888 abcnab A1 H K 0.3939 0.939 0.3939 0.77 rx82922 B1 J K 0.3838 0.393
2002 Jan 25
0
nested versus crossed random effects
Hi all, I'm trying to test a repeated measures model with random effects using the nlme library. Suppose I have two within subjects factors A, B both with two levels. Using aov I can do: aov.1 <- aov(y ~ A*B + Error(S/(A+B)) following Pinheiro and Bates I can acheive the analagous mixed-effects model with: lme.1 <- lme(y~A*B, random=pdBlocked(list(pdIdent(~1),pdIdent(~A-1),
2003 Jun 28
0
RSVGDev, lattice plots
Hi, I'm hoping to use the SVG graphics device for exporting R plots to a java application. It works well for most basic plots from the "plot" command, but does not do so well with xyplot from the lattice package. Something like: xyplot(y ~ x | f) should demonstrate the problem. thanks, Brad Buchsbaum
2022 Apr 15
0
c6a and m6a AMD Epyc AWS EC2 instances support for CentOS 8 AMI Marketplace 47k9ia2igxpcce2bzo8u3kj03
Hello, We have launched some EC2 servers 6 month ago using the CentOS 8 MarketPlace AMI 47k9ia2igxpcce2bzo8u3kj03 ( https://aws.amazon.com/marketplace/pp/prodview-ndxelprnnxecs) Now we have migrated these servers to CentOS Stream 8. We can change the instance type of these servers until m6i and c6i Intel based CPU, but we cannot change the instance type to new ADM Epyc c6a and m6a. There is an
2007 Feb 15
3
How can I batch print html pages
I thought this was easy, but it turns out to be not so obvious. My problem: I have a database with hour registration. I need to print out about hundreds of pages and have them signed by employees. Of course I want to do this automatically. Up to now I have a collection of html pages (got them using wget). So the final thing I want is to print them all out in one go. How to do that? I search
2003 Mar 04
0
Permission changes cannot be saved.
I have setup a samba share on a Solaris 8 box with win2k domain authentication. I cannot change the share permission from the Computer management window in win2K and says changes cannot be saved. I have already set 'nt acl support = yes' in smb.conf file. Any suggestions to fix this. Regards Rohana Jayatillake Systems & Infrastructure Division of Information Technology
2003 Oct 13
1
OpenSSH_3.7.1p2, Solaris 8: non-interactive authentication meth od prompts for a password
Hi, The OpenSSH_3.7.1p2, Solaris 8 case: non-interactive authentication method (publickey) works for root only ---------------------------------------------------------------------------- --------- We installed OpenSSH_3.7.1p2, SSH protocols 1.5/2.0, OpenSSL 0.9.7c We need to copy a file by SFTP from App server to a DB server with passwordless method. [cbfe-dev-app01 (client), user cbfesit]
2007 Jul 12
1
Subsetting problem
I need to perform the Exact Wilcoxon Mann-Whitney on a subset of my database. Assuming that IPPO is my data frame and IPPOBIS is the subset my variable still have 3 different levels and the function wilcox_test (package "coin") does not accept it. I do not know how to overcome this problem. ippo <- c(rep("A",10),rep("B",10),rep("C",10)) ippo2 <-