similar to: Conditional Loop For Data Frame Columns

Displaying 20 results from an estimated 100 matches similar to: "Conditional Loop For Data Frame Columns"

2004 Jun 25
2
Sweave: R code in self defined TeX-commands
Hi, I need to produce a standard report for several variables in Sweave and thus would need the possibility to define a TeX-command which includes R-code like \newcommand{\meansd}[1]{The mean is \Sexpr{mean(#1)} and the standard deviation is \Sexpr{sd(#1)} . } and then just write \meansd{age} in the latex code to get the whole sentence. The above does not work, since
2010 May 31
3
two questions about PLOT
here ,I want to plot two lines in one figure.But I have two problems 1) how to move one of the y-axis to be the right ? I tried to the command"axis(2)",But I failed. 2) how to add the axis information correctly.Since I have use the cmommand "axis(1,at=1:6,labels=gradeinfo$gradenam)" but it seems that the correct information that I want is superposition with the old axis
2006 Mar 16
2
french secondary boxplot
bonjour, i'm a mathematic teacher and i have a question for R-developers : is it possible to have (in the future) a boxplot with whiskers from the first decile to the ninth decile, as usual in secondary french schools... by example : boxplot(serie,range=-1) for french boxplot ? cordialement, jean-pierre lyc?e jean zay orl?ans, france http://mathazay.free.fr/spip/
2018 Feb 19
2
[parallel] fixes load balancing of parLapplyLB
Hi, I'm trying to understand the rationale for your proposed amount of splitting and more precisely why that one is THE one. If I put labels on your example numbers in one of your previous post: nbrOfElements <- 97 nbrOfWorkers <- 5 With these, there are two extremes in how you can split up the processing in chunks such that all workers are utilized: (A) Each worker, called
2018 Feb 26
2
[parallel] fixes load balancing of parLapplyLB
Dear Christian and Henrik, thank you for spotting the problem and suggestions for a fix. We'll probably add a chunk.size argument to parLapplyLB and parLapply to follow OpenMP terminology, which has already been an inspiration for the present code (parLapply already implements static scheduling via internal function staticClusterApply, yet with a fixed chunk size; parLapplyLB already
2018 Feb 19
0
[parallel] fixes load balancing of parLapplyLB
Dear R-Devel List, I have installed R 3.4.3 with the patch applied on our cluster and ran a *real-world* job of one of our users to confirm that the patch works to my satisfaction. Here are the results. The original was a series of jobs, all essentially doing the same stuff using bootstrapped data, so for the original there is more data and I show the arithmetic mean with standard deviation. The
2018 Feb 12
2
[parallel] fixes load balancing of parLapplyLB
Dear R-Devel List, **TL;DR:** The function **parLapplyLB** of the parallel package has [reportedly][1] (see also attached RRD output) not been doing its job, i.e. not actually balancing the load. My colleague Dirk Sarpe and I found the cause of the problem and we also have a patch to fix it (attached). A similar fix has also been provided [here][2]. [1]:
2018 Feb 20
0
[parallel] fixes load balancing of parLapplyLB
Dear Henrik, The rationale is just that it is within these extremes and that it is really simple to calculate, without making any assumptions and knowing that it won't be perfect. The extremes A and B you are mentioning are special cases based on assumptions. Case A is based on the assumption that the function has a long runtime or varying runtime, then you are likely to get the best load
2018 Mar 01
0
[parallel] fixes load balancing of parLapplyLB
Dear Tomas, Thanks for your commitment to fix this issue and also to add the chunk size as an argument. If you want our input, let us know ;) Best Regards On 02/26/2018 04:01 PM, Tomas Kalibera wrote: > Dear Christian and Henrik, > > thank you for spotting the problem and suggestions for a fix. We'll probably add a chunk.size argument to parLapplyLB and parLapply to follow OpenMP
2010 Jun 14
9
Multipart forms by default?
Forms without explicit enctype are submitted as application/x-www-form- urlencoded. This is the default behaviour in Rails. However, this enctype does not allow transmission of binary data (files). Would it not make sense to specify the enctype multipart/form-data by default instead? i.e. all the form_for helpers would add this enctype to the form tag, unless overriden by the developer. This
2011 Mar 11
5
How to calculate means for multiple variables in samples with different sizes
Hello R-helpers: I have data like this: sample replicate height weight age A 1.00 12.0 0.64 6.00 A 2.00 12.2 0.38 6.00 A 3.00 12.4 0.49 6.00 B 1.00 12.7 0.65 4.00 B 2.00 12.8 0.78 5.00 C 1.00 11.9 0.45 6.00 C 2.00 11.84 0.44 2.00 C 3.00 11.43 0.32 3.00 C 4.00 10.24 0.84 4.00 D
2002 Aug 20
2
weighting means
Hi everyone, I've got a dataframe called 'faculty'. I want to do a weighted mean on the column called 'Q8' weighted by the contents of column 'CETP'. In addition, I need to operate on the result of splitting 'faculty' according to the contents of a column 'FACULTY'. For example > lapply(split(faculty$Q8, faculty$FACULTY), mean) $"1" [1]
2009 May 24
1
Animal Morphology: Deriving Classification Equation with Linear Discriminat Analysis (lda)
Fellow R Users: I'm not extremely familiar with lda or R programming, but a recent editorial review of a manuscript submission has prompted a crash cousre. I am on this forum hoping I could solicit some much needed advice for deriving a classification equation. I have used three basic measurements in lda to predict two groups: male and female. I have a working model, low Wilk's lambda,
2013 Jan 05
5
Need help on dataframe
Dear R users, I came up to a problem by taking means (or other summary statistics) of a big dataframe. Suppose we do have a dataframe: ID V1 V2 V3 V4 ........................ V71 1 6 5 3 2 ........................ 3 2 3 2 2 1 ........................ 1 3 6 5 3 2 ........................ 3 4 12 15 3 2 ........................ 100
2006 Feb 10
8
Fitdistr and MLE for parameter lambda of Poisson distribution
Hello! I would like to get MLE for parameter lambda of Poisson distribution. I can use fitdistr() for this. After looking a bit into the code of this function I can see that value for lambda and its standard error is estimated via estimate <- mean(x) sds <- sqrt(estimate/n) Is this MLE? With my poor math/stat knowledge I thought that MLE for Poisson parameter is (in mixture of LaTeX
2009 Jun 16
4
confusion on levels() function, and how to assign a wanted order to factor levels, intentionally?
Dear R-helpers, I want to make a series of boxplots on several numeric univariates with two group variables (species and population, population nested in species, and with population as the X-axis). In order to get a proper order of the individual populations in X-axis, I need to assign a wanted order to the factor (population). I used the levels() function to do this assignment, but it seemed
2011 Dec 14
1
Help loading a corrupt vdi file
Hello everyone, I have a corrupt .vdi file from a virtualbox installation (XP host, Mint 11 guest) which I recently broke. I wanted to allocate more space to it, so I ran this command:VBoxManage.exe modifyhd /path/to/YOUR_HARD_DISK.vdi --resize 17179869184 It only took a second to actually complete, so I think a header somewhere is broken. I need to get access to some files I had on there using
2010 Nov 02
5
density() function: differences with S-PLUS
Hello! Someone know what are the difference between R and S-PLUS in the density() function? For example, I would like to reply this simple S-PLUS code in R, but I don't understand which parameter I should modify to get the same results. S-PLUS CODE: density(1:1000, width = 4) R-CODE: density(1:1000, bw = 4, window = "g", n = 50, cut = 0.75) I obtain the same x values, but
2004 Oct 15
1
power in a specific frequency band
Dear R users I have a really simple question (hoping for a really simple answer :-): Having estimated the spectral density of a time series "x" (heart rate data) with: x.pgram <- spectrum(x,method="pgram") I would like to compute the power in a specific energy band. Assuming that frequency(x)=4 (Hz), and that I am interested in the band between f1 and f2, is the
2006 Nov 13
0
Confidence intervals for relative risk
Wolfgang, It is common to handle relative risk problems using Poisson regression. In your example you have 8 events out of 508 tries, and 0/500 in the second data set. > tdata <- data.frame(y=c(8,0), n=c(508,500), group=1:0) > fit <- glm(y ~ group + offset(log(n)), data=tdata, family=poisson) Because of the zero, the standard beta/se(beta) confidence intervals don't work.