search for: yf

Displaying 20 results from an estimated 109 matches for "yf".

Did you mean: vyf
2006 Nov 01
2
xyplot: Plotting two variables, one as points - the other as line. Can that be done without explicitly using panel functions
Hi! Consider d <- data.frame(x=1:10,y=5+1:10, yf=rnorm(10,5+1:10)) x y yf 1 1 6 5.268621 2 2 7 8.623896 3 3 8 8.114830 4 4 9 10.125955 5 5 10 9.977261 ... I plot y and yf against x with xyplot(y+yf~x,data=d,col=c('red','green'),pch=c("a","b")) BUT - I would like that the plo...
2009 Aug 05
4
multiple lty on same panel in xyplot
..."n"', and subsequently execute a series of "points" or "lines" commands, one for each different group or function. What is the elegant way to do this using xyplot? To make this concrete, consider the following toy example: k<- 10 x<- (1:k)/3 yM<-6 + x^2 yF<-12 + x^(1.5) xNA<-x[length(x)] # Insertion of NA row is necessary to prevent a meaningless line # from being drawn from the females to the males across the entire plot. DAT<-data.frame( x=c(x, xNA, x) , y=c(yF, NA, yM) , sex=c( rep(0, k ), 0, rep(1, k)) ) library("lattice")...
2008 Jun 20
2
Problems with basic loop
...20-24 190 37 25-34 555 204 35-44 330 87 45-54 198 65 55-64 67 35 65+ 10 8 Now ectors to store counts and column proportions > xT<-x[,"True"] > xF<-x[,"False"] > yT<-x[,"True"]/colSums(x) > yF<-x[,"False"]/colSums(x) check length for dynamic looping > length(yT) [1] 8 now create loop > for(i in 1:length(yT)){ + pwr.2p2n.test(2*(asin(sqrt(yT[i]))-asin(sqrt(yF[i]))),n1=xT[i],n2=xF[i]) + } Error in pwr.2p2n.test(2 * (asin(sqrt(yT[i])) - asin(sqrt(yF[i]))), n1 = xT[i],...
2000 Apr 10
2
Newbie: how to calculate group averagege?
Dear R-List, I?m new in R, so I hope my question is not to primitive, but I haven?t found a solution in the R-help. I?ve got a datatframe with 3 factors, called xf (9 levels), yf (9 levels), zf (3 levels) and one variable (rt): > xf yf zf rt > 1 1 1 67 > 1 1 1 56 > 1 1 1 60 [...] > 1 1 2 58 > 1 1 2 61 [...] > 9 1 1 62 > 9 1 1 65 [...] > 9 9 3 70...
2011 Jan 17
1
isoreg memory leak?
...^^ Looking at the C code, I believe the problem arises as a consequence of using SETLENGTH to resize the result near the very end of isoreg.c, and the solution is to make a copy of iKnots. SEXP R_isoreg(SEXP y) { int n = LENGTH(y), i, ip, known, n_ip; double tmp, slope; SEXP yc, yf, iKnots, ans; const char *anms[] = {"y", "yc", "yf", "iKnots", ""}; /* unneeded: y = coerceVector(y, REALSXP); */ PROTECT(ans = mkNamed(VECSXP, anms)); SET_VECTOR_ELT(ans, 0, y = y); SET_VECTOR_ELT(ans, 1, yc = allocVecto...
2001 Jan 10
1
optmizing with monotone stepfunctions?
Before re-inventing the wheel I would like to ask: does anyone know about an optimizer in R which can reliably identify which value of X (Xopt) leads to Y (Yopt) closest to Ytarget in Y <- MonotoneStepFun(X) optionally with the restriction that Yopt <= Ytarget (at least if any Y <= Ytarget, otherwise any Yopt > Ytarget would be the preferred answer) If none is known, I will write
2013 Oct 17
0
Singular Matrix 'a' in solve
...lag_v <- function(x,lagn){ yl <- matrix(c(0),nrow=n,ncol=t) for (i in 1:n) { yl[i,]<-x[(1+(i-1)*t):(t*i)] } yl <- yl[,(1+max_lag-lagn):(t-lagn)] out <- matrix(t(yl),nrow=nrow(yl)*ncol(yl),ncol=1) out } tr <- function(y){ yf <- matrix(c(0),nrow=n,ncol=tt) for (i in 1:n) { yf[i,]<-y[(1+(i-1)*tt):(tt*i)] } yfm <- yf- colMeans(t(yf)) yfm <- yfm[,1:(tt-1)] out <- matrix(t(yfm),nrow=nrow(yfm)*ncol(yfm),ncol=1) out } *Then before the computation, something is being setup* x...
2010 Jul 27
0
3d topographic map [SEC=UNCLASSIFIED]
...owing code, I have also used the mapproj library which provides the map.grid function for drawing lat/lon lines on map projections. rm(list=ls()) library(maps) library(mapdata) library(geomapdata) library(mapproj) (2) Load the variables data(ETOPO5) xf <- attr(ETOPO5,'lon') # all lon yf <- attr(ETOPO5,'lat') # all lat zf <- ETOPO5 # elevation (3) The topography data has to be flipped horizontally and vertically and you also require the data to be placed on a regular grid and you need to specify limits, xn <- which(xf>=your_lon_low_limit & xf<=your_lon_...
2011 Jan 11
1
glm specification where response is a 2col matrix
...lm(y ~ x1 + x2, data = X, family="binomial") second with a model matrix that full rows (i.e. has as many rows as real observations) and represents identical data: Xf <- data.frame(x1 = factor(rep(c(1,1,0,0), rowSums(y))), x2 = factor(rep(c(0,1,0,1), rowSums(y)))) yf <- factor(rep(rep(0:1, 4), t(y))) glm(yf ~ x1 + x2, data = Xf, family="binomial") we will find that the number of degrees of freedom and the AIC etc. differ -- I'd expect them to be identical (as the coefficient estimates and such things are). maybe I am confused tonight, he...
2006 Nov 09
2
Single precision data behaviour with readBin()
Hi all, I am running R version 2.4.0 (2006-10-03) on an i686 pc with Mandrake 10.2 Linux. I was given a binary data file containing single precision numbers that I would like to read into R. In a previous posting, someone suggested reading in such data as double(), which is what I've tried: > zz <- file(file, "rb") > h1 <- readBin(con = zz, what = double(), n = 1, size
2011 Feb 28
3
nls not solving
...f points (6), but when I create a dataset, I get the same problem. If I remove the parameter "a," then it can find a solution. Does anyone know what I can do to fit this model? vardata<- rnorm(73,mean=0,sd=5) x<-0:72 a<-1 b<-50 k<-0.05 l<-5 startt<-c(a,b,k,l) yf<-a+b*(1-exp(-k*(x-l))) y<-yf+vardata nmodel<-nls(y~a+b*(1-exp(-k*(x-l))), start=list(a=1,b=50,k=0.05,l=5)) -- View this message in context: http://r.789695.n4.nabble.com/nls-not-solving-tp3328647p3328647.html Sent from the R help mailing list archive at Nabble.com.
2007 May 14
1
parsing an lmer error with interaction term
...I get an error I can't parse (see below). Here is some sample data: Subject Concord Age Disc SVC999MX148SU-F yes u int TOU999JU030S1 yes u int TOU999JU030S1 yes u int TOU999JU030S1 yes u int TUT578MX037S2 yes g int COL140MX114S2 yes yf mix COL140MX114S6 yes u mix COL140MX114S2 yes yf mix COL425MX075S2 yes of mix COL425MX075S2 yes of mix COL425MX075S2 yes of mix STP560JG118S14 no g pnl STP560JG118S22 no g pnl STP560JG118S20 no g pnl STP560JG118S15 no...
2004 Jan 28
3
unstability when using isoreg() function (PR#6494)
...ndows XP, Linux Submission from: (NULL) (195.113.27.212) The isoreg() function causes R to crash when called repeatedly. Consider the following simple script: { library(modreg) N <- 10 x <- rnorm(N) print("Original x values:") print(x) for(n in (1:N)){print(y <- isoreg(x[1:n])$yf)} } I am able to run (call) it several times, let say 6 or 10 times, and when trying once more, R crashes. In Windows a screen with "The R GUI software has caused errors and will be terminated by windows. All unsaved information will be lost." message appears, using Linux R crash...
2018 Nov 03
4
inquiry about limitation of file system
...ns of files on the file system. Then may I ask that what is the maximum number of files which could be stored in one directory without affecting the performance of web server? At 2018-11-03 16:03:56, "Walter H." <Walter.H at mathemainzel.info> wrote: >On 03.11.2018 08:44, yf chu wrote: >> I have a website with millions of pages. >> >does 'millions of pages' also mean 'millions of files on the file system'? > >just a hint - has nothing to do with any file system as its universal: >e.g. when you have 10000 files >don't store...
2008 Jun 03
1
splitting data frame based on a criteria
Hi, I have a data frame that I want to split into two based on the values of a variable in it. The variable Y has numeric values ranging between 0 through 70. I want to plot the frequencies of another variable X in two different cases: - When Y = 0 and - When Y > 0 How does one go about doing this? In general, I want to do several analyses with this data frame that are a variation of the
2012 Aug 11
8
Pass array to a define
How can I pass an array to a define? It''s not documented in the puppet language guide. I''ve got: define lvm::create_vg ( $pvdisks ) { exec { ''pvcreate'': command => "/sbin/pvcreate -yf $pvdisks", unless => "/sbin/pvdisplay $pvdisks", ... } } class someclass { lvm::create_vg { ''bcvg01'': pvdisks => [''/dev/xvdb1'', ''/dev/xvdc1'']; } } Inside the define,...
2007 Feb 08
0
How to get p-values, seperate vectors of regression coefficients and their s.e. from the "yags" output?
...r my simulation please? Also, how can I get the standard errors of these reg. coefficients as a seperate vector? Notice, as it is highlighted below, beta1=coef(wee) giving me "NULL" and also summary(wee) is not giving me nothing! The following is the output from the yags analysis: > yf=formula(Ddimer~newrace+steroid+treatment+SOFA+PSI) > wee=yags(yf, id=Subject, data=final, cor.met=as.double(rep(0:6, 872)), family=gaussian, corstruct="exchangeable", control=yags.control(), weights=w, betainit=NULL, alphainit=.1, subset=NULL) > wee YAGS (yet another GEE solver) $Da...
2013 Mar 01
1
predict.loess() segfaults for large n?
...e (above is for surface=="interpolate"). The following sample code does not result in segfault but when run with valgrind, it produces the warning about large range. (In the code that segfaults N is about 77,000). set.seed(1) n = 5000 # n=4000 seems ok x = rnorm(n) y = x + rnorm(n) yf = loess(y~x, span=0.75, control=loess.control(trace.hat="approximate")) print( predict(yf, data.frame(x=1), se=TRUE) ) ##---valgrid output with segfault (abridged): > test4() ==30841== Warning: set address range perms: large range [0x3962a040, 0x5fb42608) (defined) ==30841== Warning:...
2011 Feb 17
2
convert the sas file into csv in R
i am trying to convert sas file into csv. I used write.csv(a, file="cool.csv") but nothing come out. i don't know why. Thanks. library(Hmisc) a<- sasxport.get("C:\\Users\.....") write.csv(a, file="cool.csv") -- View this message in context: http://r.789695.n4.nabble.com/convert-the-sas-file-into-csv-in-R-tp3311769p3311769.html Sent from the R help mailing
2017 Mar 25
7
[Bug 2699] New: PKCS#8 private keys with AES-128-CBC stopped working
https://bugzilla.mindrot.org/show_bug.cgi?id=2699 Bug ID: 2699 Summary: PKCS#8 private keys with AES-128-CBC stopped working Product: Portable OpenSSH Version: 7.5p1 Hardware: amd64 OS: Linux Status: NEW Severity: normal Priority: P5 Component: ssh-keygen Assignee: