similar to: Parallel processing for R loop

Displaying 20 results from an estimated 3000 matches similar to: "Parallel processing for R loop"

2012 Aug 02
6
Polygon shaded area
Hi all, I have two vectors (columns) called "efinal" and "efinal 2". I want to plot them on the same plot and "draw" a shaded area beween the two lines using function polygon I have tried all but I don ?t understand the polygon area, can you help me with examples? plot(efinal,type="l",ylim=range(min(efinal2),
2011 Oct 10
3
How to test if two C statistics are significantly different?
Hey all, In order to test if a marker is a risk factor, I built two models (using cox proportional hazard model). One model included this marker, and the other is not. Then, I use R package risksetROC to test how much predictive value did the marker add to this model. I get two C statistics by analyzing the linear predictors of the two models into this package. The qustion is How to test if two
2012 Feb 21
2
Using substitute in nested function calls
Dear List members, I really, like the feature that one can call R functions with mathematical expressions, e.g. curve(x^2, 0, 1) I wonder, how I can construct in a simple way a function like mycurve = function (expr) {...} such that that a call mycurve(x^2) has the same effect as the call curve(x^2, -100,100) Below is some code that works, but it seems much to complicated: it first
2011 Oct 11
4
need help on read.spss
Hi, I have one doubt about one of the parameter of 'read.spss()' from 'foreign' package. Here is the syntax :- read.spss ( file, use.value.labels = TRUE, to.data.frame = FALSE, max.value.labels = Inf, trim.factor.names = FALSE, trim_values = TRUE, reencode = NA, use.missings = to.data.frame ) In above syntax when I pass *'to.data.frame=
2011 Oct 01
1
Gstat - Installation Fail _ download source and compile help ...
Hello I have been trying to install gstat on university's unix based system ( i am not familiar with many technical aspects of installation) but i am getting a particular error which i could not find a solution to online. Here is what the technical support guy mailed me back, i am sure someone who understands the technicalities can explain me this procedure in a more lucid way. * **Technical
2011 Dec 05
1
Toggle cASE
Hello R-help list,   I am looking for way to toggle the case of the characters like a flip-flop; that is from ''Hello'' to "hELLO" or vice versa.   I know that there are a number of functions like casefold, tolower, toupper, etc. but these functions change the case in an uniform way.   Thanks in advance,   Antonio Rivero Ostoic         Antonio Rivero Ostoic PhD Student,
2012 Apr 02
1
\Sexpr{}
Did anyone know whether the problem " it doesn't evaluate \Sexpr{} in Sweave" has been fixed? I checked r help page and realized it was asked a couple of years ago. But I didn't find solutions. Thanks for your help in advance! Hua [[alternative HTML version deleted]]
2012 Jul 05
1
Import single variables from SPSS
Dear all, I have got a very big SPSS dataframe and I would like to just import one or a few variables (the dataframe has got a lot of colums). I used the package foreign but I couldn't find anything in there for my problem. Thank you very much for your help in advance. Marion [[alternative HTML version deleted]]
2012 Jun 01
2
Day or Month difference between dates???
HI, R-Users: I got a questions. have been struggling so long time.... I have this data: > m1$Year_Month 201009 201010 201011 201101 201102 > min(m1$Year_Month) 201009 I want to calculate the following two answers, how do I program it? > difference in Month????? [1] 0 1 2 4 5 >difference in Days????? 0 31 61 .... Thank you in advance!!! Tammy [[alternative
2011 Oct 24
2
splitting a string into words preserving blanks (using regex)
I would like to split a string into words at its blanks but also to preserve all blanks. Example: c(" some words to split ") should become c(" ", "some", " ", " words", " ", "to" , " ", "split", " ") I was not able to achieve this via strsplit() . But I am not familiar with regular
2011 Oct 05
2
"unload" a library while testing?
Hi I am testing a package, and after I make changes, I have to close R and open R again to load the new version (same version number) of the package I am working on. So my question: is there a function which removes a package, i.e library(myPackage) > Package is loaded unlibrary(myPackage) > package is not loaded any more Thanks, Rainer -- Rainer M. Krug, PhD (Conservation Ecology,
2011 Oct 25
1
textplot in layout
Hello, Someone (Erik) recently posted about putting text on a plot. That thread didn't help. I'd like to put text directly below the 'sub' text (with no gap). The code below is the best I can do. Note the large undesirable gap between 'sub' and 'test'. I'd like the word 'test' to be just below the top box() boarder (directly below 'sub'). year
2012 Mar 28
2
Test Normality
Good Night I made different test to check normality and multinormality in my dataset, but I don´t know which test is better. To verify univariate normality I checked: shapiro.test, cvm.test, ad.test, lillie.test, sf.test or jaque.bera.test and To verify multivariate normal distribution I use mardia, mvShapiro.Test, mvsf, mshapiro.test, mvnorm.e. I have a dataset with almost 1000 data and 9
2011 Oct 20
1
How to remove all objects except the sequence
Dear All: I would like to know if there is plausible way to say to R to remove all elements in the memory but the sequence. I have a code which makes a loop, and what I want is after the programme has performed all the operation over every "i"th element, to remove all the objects, expect the sequence parameter. I included the option "rm(list=ls(all=TRUE))", but obviously that
2011 Oct 13
2
how to plot two surfaces with lattice::wireframe
Hi all, I'd like to plot the Real and Imaginary parts of some f(z) as two different surfaces in wireframe (the row/column axes are the real and imag axes). I know I can do it by, roughly speaking, something like plotz <- expand.grid(x={range of Re(z)}, y={range of Im(z), groups=1:2) plotz$func<-c(Re(f(z),Im(f(z)) wireframe(func~x*y,data=plotz,groups=groups) But that seems like a
2012 Jul 17
4
how to create table with file link in Rd File
Hi how to create table with file link in Rd File Thanks B.Purushothaman -- View this message in context: http://r.789695.n4.nabble.com/how-to-create-table-with-file-link-in-Rd-File-tp4636740.html Sent from the R help mailing list archive at Nabble.com.
2012 Jul 19
2
problem with using apply for dataframe
Dear people, I am including an example of a dataframe: mydataframe<-data.frame(X=c(1:4),total_bill=c(16.99,10.34,21.01,23.68),tip=c(1.01,1.66,3.50,3.31),sex=c("Male","Male","Male","Female")) When I use the sapply function getting the information about the factors works: sapply(mydataframe,function(x)is.factor(x)) X total_bill tip
2011 Oct 05
3
help with regexp
Dear list memebers, I am stuck with using regular expressions. Imagine I have a vector of character strings like: test <- c('filename_1_def.pdf', 'filename_2_abc.pdf') How could I use regexpressions to extract only the 'def'/'abc' parts of these strings? Some try from my side yielded no results: testresults <-
2012 Jul 19
3
Finding the last value before a certain date
Hello all, I have a dataframe that looks like this: head(df) date y 1 2010-09-27 1356 2 2010-10-04 1968 3 2010-10-11 2602 4 2010-10-17 3116 5 2010-10-24 3496 6 2010-10-31 3958 I need a function that, given any date, returns the y value corresponding to the given date or the last day before the given date. Example: Input: as.Date("2010-10-06"). Output: 1968 (because the
2012 Feb 23
2
Aggregate with Function List ?
R Experts I wish to tabulate into one data frame statistics summarizing concentration data. The summary is to include mean, standard deviation, median, min and max. I wish to have summaries by Dose, Day and Time. I can do this by calling aggregate once for each of the statistics (mean, standard deviation, median, min and max) and then execute 4 merges to merging the 5 data frames into