similar to: passing arguments to subset from a function

Displaying 20 results from an estimated 8000 matches similar to: "passing arguments to subset from a function"

2011 Dec 08
1
prop.test() and the simultaneous confidence interval for multiple proportions in R
Dear list members, I want to perform in R the analysis "simultaneous confidence interval for multiple proportions", as illustrated in the article of Agresti et al. (2008) "Simultaneous confidence intervals for comparing binomial parameter", Biometrics 64, 1270-1275. If I am not wrong the R function implementing the Agresti et al. method is prop.test(). I ask an help because I
2008 Jul 31
1
strip names lattice graphics
R-helpers, I'm having difficulty with customizing strip names for a lattice graphic. Here is an example using the iris data set : xyplot(Sepal.Length+Sepal.Width~Petal.Length,groups=Species,data=iris) ## I'd like to change the 2 strip names to "Length" and "Width" for example, this is what I've tried :
2012 Jul 30
1
lattice legen and auto.key conflict
Hello R-helpers, I'm trying to customize a graphic in lattice using the 'legend' argument to add labels on my plot but in the process I'm losing the legend drawn by 'auto.key', despite the fact that I'm actually not sticking these on the same sides of the graphic. I worked up a quick and simple example with the iris data : ### here's the basic graph
2010 Feb 16
1
difftimes; histogram; memory problems
Hi All: Let's say I have two dataframes (Condition1 and Condition2); each being on the order of 12,000 and 16,000 rows; 1 column. The entries contain dates. I'd like to calculate, for each possible pair of dates (that is: Condition1[1:10,000] and Condition2[1:10,000], the number of days difference between the dates in the pair. The result should be a matrix 12,000 by 16,000. Really,
2007 Oct 02
1
splom pairs and groups argument
Hello, I'm trying to pull off a certain graph using splom, and can't quite get my panel functions right. Basically, the equivalent using pairs would be something like this (using iris data set as an example): panel.corval <- function(x, y, digits=2, prefix="", cex.cor,col,pch) { usr <- par("usr"); on.exit(par(usr)) par(usr = c(0, 1, 0, 1))
2012 Nov 24
2
Performing operations only on selected data
I spent some time on this simple question, also searched the forum, eventually hacked my way to an ugly solution for my particular problem but I would like to improve my coding: I have data of the form: df <- expand.grid(group=c('copper', 'zinc', 'aluminum', 'nickel'), condition1=c(1:4)) I would like to add a new data column "condition2", with values
2010 May 20
1
Mixed Effects Model on Within-Subjects Design
Dear R Experts, I am attempting to run a mixed effects model on a within-subjects repeated measures design, but I am unsure if I am doing it properly. I was hoping that someone would be able to offer some guidance. There are 5 independent variables (subject, condition, difficulty, repetition) and 1 dependent measure (value). Condition and difficulty are fixed effects and have 3 levels each
2008 Aug 25
1
lattice : using both strip and strip.left
Dear all, I'm routinely using lattice and ggplot2, I wish to create a lattice theme that looks not too dissimilar to ggplot's defaults so I can include both graphs in a document with a consistent look. To illustrate my questions, consider the following example: > library(ggplot2) > library(lattice) > > # example data > x <- seq(0, 10, len = 100) > y1 <-
2014 Sep 25
5
[LLVMdev] New type of smart pointer for LLVM
Hello everyone, I bring to discussion the necessity/design of a new type of smart pointer. r215176 and r217791 rise the problem, D5443 <http://reviews.llvm.org/D5443> is devoted to the solution. r215176 applies several temporary ugly fixes of memory leaks in TGParser.cpp which would be great to be refactored using smart pointers. D5443 <http://reviews.llvm.org/D5443> demonstrates
2009 Feb 25
1
read multiplan or sylk files in R
Hello, This may sound crazy, but I have a large number of Multiplan data files I'm in the process of recuperating, and I'm hoping to avoid having to open them one by one to convert them into a modern, directly usable format. So I was wondering if someone somewhere had encountered this and maybe had a way to read Multiplan files in R, or, at least, a way to read SYLK files directly in R.
2008 Aug 13
3
conditional IF with AND
Hi everyone, I'm trying to create an "if" conditional statement with two conditions, whereby the statement is true when condition 1 AND condition 2 are met: code structure: if ?AND? (a[x,y] <condition1>, a[x,y] <condition2>) I've trawled through the help files, but I cannot find an example of the syntax for incorporating an AND in a conditional IF statement.
2010 May 31
1
Post-hoc tests for repeated measures in balanced experimental design
Hi, I am performing experiments in the field of visual perception where we often apply balanced designs. Within a group of normal subjects, we vary different stimulus conditions (like contrast, luminance, temporal frequency of stimulation) and derive some psychophysical or electrophysiological results from our subjects. Often, the main question is to test the effect of these parameters
2010 Apr 30
2
deriving mean from specific cases
Hi all, I have a large dataset that has >10k entries. The dataset is stored in a dataframe with the headers: SubID Condition1 Condition2 Result1 Result2 There are multiple entries for a given SubID(Subject ID). Condition 1 has 3 levels and condition2 has 2 levels (therefore there are 6 possible combinations all together e.g. Cond1 Level1 x Cond2 Level 1 etc.) and i need to compute for 1. The
2007 Jul 30
8
regular expressions : extracting numbers
Hello all, I have a vector of character strings, in which I have letters, numbers, and symbols. What I wish to do is obtain a vector of the same length with just the numbers. A quick example - extract of the original vector : "lema, rb 2%" "rb 2%" "rb 3%" "rb 4%" "rb 3%" "rb 2%,mineuse" "rb" "rb" "rb 12"
2006 Aug 16
2
adding multiple fitted curves to xyplot graph
Hello RHelpers, This may already have been answered, but despite days of scouring through the archives I haven't found it. My goal is to add multiple fitted curves to a plot. An example data set (a data frame named df in following code) is: x1 y1 factor1 4 1298.25 0.00000000 1 5 1393.25 0.00000000 1 6 1471.50
2008 Jun 26
1
xyplot: tick marks inside panel
Hello all, Working with a typical xyplot figure (for example the first from example(lattice) ) I would like to place the tick marks inside the panels instead of outside. I believe working with the axis argument might be the way to do it, but do not see how? Could anyone help me out in doing this? In advance thank you. David Gouache ARVALIS - Institut du v?g?tal Station de La Mini?re 78280
2014 Sep 25
2
[LLVMdev] New type of smart pointer for LLVM
On Thu, Sep 25, 2014 at 1:44 AM, Renato Golin <renato.golin at linaro.org> wrote: > On 25 September 2014 06:16, David Blaikie <dblaikie at gmail.com> wrote: > > I can go & dredge up some examples if we want to discuss the particular > > merits & whether each of those cases would be better solved in some other > > way, but it seemed pervasive enough in the
2007 Nov 27
2
rearrange data: one line per subject, one column per condition
Dear R-list, Is there a way to convert the typical long R data-format to a 1-line per subject format? I have data formatted as: Group subj condition variable 1 1 1 746.36625 2 2 1 1076.152857 1 3 1 1076.152857 2 4 1 657.4263636 1 5 1 854.1266667 2 6 1 1191.676154 1 7 1 1028.175385 1 1 2 46.36625 2 2 2 76.152857 1 3 2 76.152857 2 4 2 57.4263636 1 5 2 54.1266667 2 6 2 191.676154 1 7 2 028.175385
2012 Dec 10
3
splitting dataset based on variable and re-combining
I have a dataset and I wish to use two different models to predict. Both models are SVM. The reason for two different models is based on the sex of the observation. I wish to be able to make predictions and have the results be in the same order as my original dataset. To illustrate I will use iris: # Take Iris and create a dataframe of just two Species, setosa and versicolor, shuffle them
2010 Jun 09
4
question about "mean"
Hi there: I have a question about generating mean value of a data.frame. Take iris data for example, if I have a data.frame looking like the following: --------------------- Sepal.Length Sepal.Width Petal.Length Petal.Width Species 1 5.1 3.5 1.4 0.2 setosa 2 4.9 3.0 1.4 0.2