similar to: while loop until end of file

Displaying 20 results from an estimated 1000 matches similar to: "while loop until end of file"

2013 Dec 08
2
How to evaluate sequence of strings like this
Hello Dear R community,  This is my problem.  I have a data set (dataframe) called "mydat". It consist of 3 numerical variable.  They are Centrecode, FSUSN and Round. I want to create unique ID by combining these 3 variables. Follwing commands gives me what I need. mydat1 <- paste(mydat$Centrecode, mydat$FSUSN,mydat$Round,sep="") newds <- data.frame(mydat1)    For a
2012 Jun 25
3
Loop for multiple plots in figure
Hello, I have longitudinal data of the form below from N subjects; I am trying to create figure with N small subplots on a single page, in which each plot is from only one subject, and in each plot there is a separate curve for each value of param1. So in this case, there would be four plots on the page (one each for Bob, Steve, Kevin and Dave), and each plot would have two separate curves (one
2012 Feb 13
2
Error in apply(x2, 1, diff) : dim(X) must have a positive length
Anyone knows hat might be the cause of this error? Thanks for any help! >library(MASS) > dif.mns = function(x2,tr1=.2,tr2=.3){ + #generates four different 'means' using + #difference scores from x2, an n x 2 matrix + #for use w/ bootstrap comparisons + diffs = apply(x2,1,diff) + mn1=mean(diffs) + mn2=mean(diffs,tr=.2) + mn3=mean(diffs,tr=.3) +
2010 Sep 07
2
Plotting longitudinal data
Hello, Hope that someone could help me plotting longitudinal data below: 7213 3333330001 0.8300 13.05.09 1 1 3333330001 0.8700 09.02.05 NULL 4797 3333330001 0.7700 21.03.07 NULL 2399 3333330001 0.7800 12.04.06 NULL 2400 3333330002 NULL 27.03.06 NULL 7230 3333330002 0.8200 14.05.09 0 2 3333330002 0.8400 09.02.05 NULL 4798 3333330002 0.8700 20.03.07 0 4799 3333330003 0.9000 20.03.07 13 2401
2004 Jul 01
2
R can't find some functions in assist package
Oh yes. The "load package" under the "packages menu" in the Windows version does that. To check I typed "library(assist)" after starting R. Same behavior, ssr is found, but others like predict.ssr, and plot.ssr, give a "not found" message. Thanks for the suggestion. Mike
2005 Mar 08
1
coefficient of partial determination...partial r square [ redux]
If I'm not mistaken, partial R-squared is the R^2 of the quantities plotted in a partial residual plot, so you can base the computation on that. Prof. Fox's `car' package on CRAN has a function for creating those plots, but you need to figure out the way to extract the quantities being plotted. [In any case, the basic tools for doing such computations are all in R, and it
2003 Sep 07
3
bug in crossprod? (PR#4092)
# Your mailer is set to "none" (default on Windows), # hence we cannot send the bug report directly from R. # Please copy the bug report (after finishing it) to # your favorite email program and send it to # # r-bugs@r-project.org # ###################################################### # The last line of following code produces a segmentation fault: x <- 1:10 f <- gl(5,2)
2013 May 16
2
R looping help
Hey I'm not really sure what I should put on here, but I am having trouble with my R code. I am trying to get the p-values, R^2s etc for a number of different groups of variables that are all in one dataset. This is the code: #Stand counter st<-1 #Collections stands<-numeric(67) slopes<-numeric(67) intercepts<-numeric(67) mses<-numeric(67) rsquares<-numeric(67)
2010 Sep 04
2
R code output issues
Hi all, I have a short R code file that I am using to perform calculations on a dataset. I am having a few issues with output: 1. Although my input data file is 2149 lines long, when I type "results.df" from the command line, I get the appropriate calculation results for only the first 46 rows. Same result if I "sink" the output to a file, and type "results.df" at
2012 Nov 16
2
R-Square in WLS
Hi, I am fitting a weighted least square regression and trying to compute SSE,SST and SSReg but I am not getting SST = SSReg + SSE and I dont know what I am coding wrong. Can you help please? xnam <-colnames(X) # colnames Design Matrix fmla1 <- as.formula(paste("Y ~",paste(xnam, collapse=
2006 Jun 16
2
Effect size in mixed models
Hello, Is there a way to compare the relative relevance of fixed and random effects in mixed models? I have in mind measures of effect size in ANOVAs, and would like to obtain similar information with mixed models. Are there information criteria that allow to compare the relevance of each of the effects in a mixed model to the overall fit? Thank you, Bruno
2012 Nov 13
1
About systemfit package
Dear friends, I have written the following lines in R console wich already exist in pdf file systemfit: data( "GrunfeldGreene" ) library( "plm" ) GGPanel <- plm.data( GrunfeldGreene, c( "firm", "year" ) ) greeneSur <- systemfit( invest ~ value + capital, method = "SUR", + data = GGPanel ) greenSur I have obtained the following incomplete
2002 May 09
4
Rsquared in summary(lm)
Hello, I'm doing some linear regression: >lm<-lm(osas~alp,data) >summary(lm) However, the Rsquared in the output of summary() is not the same as the "standard" Rsquared calculated by spreadsheets, and outlined in statistical guidebooks, being SSR/SSTO. The output says "multiple Rsquared", but it is no multiple regression... What's the difference? Thanks,
2018 Apr 27
5
predict.glm returns different results for the same model
Hi all, Very surprising (to me!) and mystifying result from predict.glm(): the predictions vary depending on whether or not I use ns() or splines::ns(). Reprex follows: library(splines) set.seed(12345) dat <- data.frame(claim = rbinom(1000, 1, 0.5)) mns <- c(3.4, 3.6) sds <- c(0.24, 0.35) dat$wind <- exp(rnorm(nrow(dat), mean = mns[dat$claim + 1], sd = sds[dat$claim + 1])) dat <-
2006 Apr 06
4
function onComplete how to overload?
Hi all. I my apps I need to use Ajax.Request Object. One of the object options is onComplete fuction which looks like this: funcion onComplete (originalResponse) { ..some operations } I need pass to function one more parameter, how to do it? is is possible? I can''t use AJAX Updater because result of Ajax Call is uploaded to the div that I defined earlier, and in my situations I
2010 Feb 27
1
Newbie help with ANOVA and lm.
Would someone be so kind as to explain in English what the ANOVA code (anova.lm) is doing? I am having a hard time reconciling what the text books have as a brute force regression and the formula algorithm in 'R'. Specifically I see: p <- object$rank if (p > 0L) { p1 <- 1L:p comp <- object$effects[p1] asgn <-
2010 Sep 21
2
multiplying values in data frame by corresponding value in the first column
I am sure there is a simple solution to this... I have a column in a data frame specifying a grouping (1, -1) for my observations, and need to mutliply each observation in all the other columns of the data frame by the corresponding value in the given column. I played with apply, and saw some suggestions for sweep, but did not manage to get it working. My table contains NAs.... Example of
2011 Feb 09
1
add mean and sd to dotplot in each panel using lattice
Hi, I have a data frame like this: ScoreDoseSex 2.81Dose1M 1.81Dose1M 1.22Dose1M 0.81Dose1M 0.49Dose1M 0.22Dose1M 0.00Dose1M -0.19Dose1M -0.17Dose1F -0.32Dose1F -0.46Dose1F -0.58Dose1F -0.70Dose1F -0.81Dose1F -0.91Dose1F -1.00Dose1F -1.77Dose2M -1.85Dose2M -1.93Dose2M -2.00Dose2M -2.07Dose2M -2.14Dose2M -2.20Dose2M -2.26Dose2M -2.32Dose2F -2.38Dose2F -2.17Dose2F -2.49Dose2F -2.54Dose2F
2013 Feb 25
1
creating variable that codes for the match/mismatch between two other variables
Dear all, I have got two vectors coding for a stimulus presented in the current trial (mydat$Stimulus) and a prediction in the same trial (mydat$Prediciton), respectively. By applying an if-conditional I want to create a new vector that indicates if there is a match between both vectors in the same trial. That is, if the prediction equals the stimulus. When I pick out some trials randomly, I get
2018 Feb 25
3
include
Thank you Jim, I read the data as you suggested but I could not find K1 in col1. rbind(preval,mydat) Col1 Col2 col3 1 <NA> <NA> <NA> 2 X1 <NA> <NA> 3 Y1 <NA> <NA> 4 K2 <NA> <NA> 5 W1 <NA> <NA> 6 Z1 K1 K2 7 Z2 <NA> <NA> 8 Z3 X1 <NA> 9 Z4 Y1 W1 On Sat, Feb 24, 2018 at 6:18 PM, Jim