similar to: Create values based on a table of conditions

Displaying 20 results from an estimated 4000 matches similar to: "Create values based on a table of conditions"

2009 May 28
2
ggplot2 legend
Hi: I need some help with the legend. I got 14 samples(Muestreo) and I am trying to plot a smooth line for each sample. I am able to accomplish that but the problem is that the legend only displays every other sample. How can I force the legend to show all of my Muestreos? Thanks in advance. fish_ByMuestreo <- structure(list(data = structure(list(SampleDate = structure(c(3L, 3L, 3L, 3L,
2016 Apr 22
1
Unique Ordering
Hi R-Help, data at bottom I've been struggling with a problem where I need to order based on 1) the Frequency "Freq" and 2) keeping each group of 3 of the same type together "Var2" but I want across all groups it to go "high to low" based on the earn factor. Thank you! structure(list(Var1 = structure(c(1L, 3L, 2L, 1L, 2L, 3L, 1L, 3L, 2L, 3L, 1L, 2L, 3L, 1L,
2023 Jan 13
1
Customise Plot tick label on time series plot using date series
?s 05:11 de 13/01/2023, roslinazairimah zakaria escreveu: > Hi, > > I would like to customise my date series on the plot. I tried this: > > dt_ts <- ts(dt) > autoplot(dt_ts[,2]) + ylab("Charge counts") + xlab("Daily") > > but the label is not the date series. > > Tqvm for any help given. > > >> dput(dt) > structure(list(time
2008 Jul 06
2
lattice question
I'm creating a lattice barchart based off a pretty complicated data structure. The barchart comes out quite nice ( thanks to lattice ) but the problem is that the horizontal axis comes out all scrunched because the barchart doesn't know that the intervals of Var.1 are really "associated" with the conditioning variable Var.2. Therefore, all the intervals of Var.1 are put on
2017 Dec 14
2
help with recursive function
Hi, I need some help with running a recursive function. I like to run funlp2 recursively. When I try to run recursive function in another function named "calclp" I get this "Error: any(!dat2$norm_sd) >= 1 is not TRUE". I have never built a recursive function before so having trouble executing it in this case. I would appreciate any help or guidance to resolve this issue.
2011 Jul 01
2
Initiating in BNArray
Hi, I'm trying to understand some details about an example maintened in [1]. According that link, I have total.data as a data set (am I right?). But I don't understand how is built that table. I saved the dataset in a file, with dput(), and had something like this: structure(list(df.all = structure(list(V1 = structure(c(1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L,
2017 Dec 14
0
help with recursive function
You seem to have a typo at this expression (and some others like it) Namely, you write any(!dat2$norm_sd) >= 1 when you possibly meant to write !( any(dat2$norm_sd) >= 1 ) i.e. I think your ! seems to be in the wrong place. HTH, Eric On Thu, Dec 14, 2017 at 3:26 PM, DIGHE, NILESH [AG/2362] < nilesh.dighe at monsanto.com> wrote: > Hi, I need some help with running a
2012 Nov 14
2
aggrete data from combination
Dear R users, A have a dataframe (matrix) with two collumns (plot, and diameter (d)). I want all diameters values for different combination of plots. For example I want all d values for all posible combination, 100C2 (all d values for plot 1 with all d values in the plot 2.......with all d values from plot 1 with all d values from plot 100, ...... with all d values from plot 99 with all d values
2017 Dec 14
2
help with recursive function
My own typo ... whoops ... !( any(dat2$norm_sd >= 1 )) On Thu, Dec 14, 2017 at 3:43 PM, Eric Berger <ericjberger at gmail.com> wrote: > You seem to have a typo at this expression (and some others like it) > > Namely, you write > > any(!dat2$norm_sd) >= 1 > > when you possibly meant to write > > !( any(dat2$norm_sd) >= 1 ) > > i.e. I think your !
2010 Apr 05
3
bootstrap confidence intervals, non iid
hello, i need to calculate ci's for each of 4 groups within a dataset, to be able to infere about differences in the variable "similarity". the problem is that data within groups is dependent, as assigned by the blocking-factor "site". my guess was to use a block bootstrap but samples within in these blocks / sites are not of same length. i was not able to find a method to
2017 Dec 14
0
help with recursive function
Eric: Thanks for taking time to look into my problem. Despite of making the change you suggested, I am still getting the same error. I am wondering if the logic I am using in the stopifnot and if functions is a problem. I like the recursive function to stop whenever the norm_sd column has zero values that are above or equal to 1. Below is the calclp function after the changes you suggested.
2010 Apr 12
3
glmer with non integer weights
hello, i'd appreciate help with my glmer. i have a dependent which is an index (MH.index) ranging from 0-1. this index can also be considered as a propability. as i have a fixed factor (stage) and a nested random factor (site) i tried to model with glmer. i read that it's possible to use a quasibinomial distribution, for this kind of data, which i than actually did - but firstly (1)
2017 Dec 14
2
help with recursive function
Hi, I accidently left out few lines of code from the calclp function. Updated function is pasted below. I am still getting the same error ?Error: !(any(data1$norm_sd >= 1)) is not TRUE? I would appreciate any help. Nilesh dput(calclp) function (dataset) { dat1 <- funlp1(dataset) recursive_funlp <- function(dataset = dat1, func = funlp2) { dat2 <- dataset %>%
2017 Dec 14
0
help with recursive function
The message is coming from your stopifnot() condition being met. On Thu, Dec 14, 2017 at 5:31 PM, DIGHE, NILESH [AG/2362] < nilesh.dighe at monsanto.com> wrote: > Hi, I accidently left out few lines of code from the calclp function. > Updated function is pasted below. > > I am still getting the same error ?Error: !(any(data1$norm_sd >= 1)) is > not TRUE? > > >
2018 May 16
1
Systemfit Question
I can't get my simultaneous equations to work using system fit. Please help. #Reproducible script Empdata<- read.csv("/Users/ngwinuiazenui/Documents/UPLOADemp.csv") View(Empdata) str(Empdata) Empdata$gnipc<-as.numeric(Empdata$gnipc) install.packages("systemfit") library("systemfit") pdata <- plm.data(Empdata,
2017 Dec 14
3
help with recursive function
If you are trying to understand why the "stopifnot" condition is met you can replace it by something like: if ( any(dat2$norm_sd >= 1) ) browser() This will put you in a debugging session where you can examine your variables, e.g. > dat$norm_sd HTH, Eric On Thu, Dec 14, 2017 at 5:33 PM, Eric Berger <ericjberger at gmail.com> wrote: > The message is coming from
2017 Dec 14
0
help with recursive function
Eric: I will try and see if I can figure out the issue by debugging as you suggested. I don?t know why my code after stopifnot is not getting executed where I like the code to run the funlp2 function when the if statement is TRUE but when it is false, I like it to keep running until the stopifnot condition is met. When the stopifnot condition is met, I like to get the output from if statement
2009 May 15
1
data summary and some automated t.tests.
I would like to preform a t.test to each of the measured variables (sand.silt etc.) with a mean and sd for each of the treatments (up or down), and out put this as a table.... I am having a hard time starting- maybe it is to close to lunch. Any suggestions would be greatly appreciated. Stephen Sefick x <- (structure(list(sample. = structure(c(1L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 2L, 3L,
2012 Apr 18
0
Error in eval when using contrast and nlme
Hi everybody, I've written a function to run an LME model on data derived from functional magnetic resonance images. When I run the function with contrasts included I get the following error Error in eval(expr, envir, enclos) : object 'inModelFormula' not found I think it has something do do with the way contrast evaluates arguments, but I've got no idea how to fix it. The code
2010 May 19
2
contrasts for lmer model
hello, i found it most convenient to use package contrast for planned comparisons on mixed models. for instance i have a model with 2 fixed factors, one with 4 levels (stage) and one with 2 levels (gap) and a nested random factor (site) and i tested gap within level A of factor stage: library(contrast) library(nlme) m1<-lme(rich ~ stage*gap, random=~1|site,data=richness) contrast(m1, a =