similar to: check without loop

Displaying 20 results from an estimated 1000 matches similar to: "check without loop"

2002 Feb 25
5
another basic ?
i am sure that there is a simple solution that i am just overlooking, but there is no logical test for = there is one for != and >,<, >=, <=... what do i do if i need to check if something IS EQUAL or is there an easy way, in working with a matrix of size n x 3, to sort the matrix by one of the columns? specifically what i am trying to do is i have a matrix with individual and
2002 Mar 20
7
how does while work
i am having some problems with a program that i am writing and i think that knowing how the while command works will help me to figure out where i am going wrong *when do you get kicked out of a while loop?* (i.e., in the following example what would the final value of 'a' be?) i thought it would be 99 but running it in R i get 101 (and 101 for x too!) while (x <100) { for (i in
2002 Feb 18
3
i think i asked the wrong ?
me again, new to R, haven't programmed in a long time at all sorry to ask what is probably basic a while ago i asked how to remove an element from a list apparently what i am using is not a list but a vector, didn't realize there was a list data type could also use a matrix for what i am doing, is there a way to remove single elements from either of those? thanks for any help, if i was
2002 Apr 29
2
efficiency
i have a set of files that i am reading into R one at a time and applying to a function that i have written where each is a 'table' n (columns) x 10000 (rows) n varies across the files and most of the rows only have data in the first few columns currently i am reading them in with the command: read.table(file="2.75.0.997.1", header=FALSE, sep="", skip=13, fill=,
2002 Mar 08
2
? about sample
i am trying to use the sample command and have one question about it: i am getting the error Error in sample(length(x), size, replace, prob) : insufficient positive probabilities when i use something like: sample (1:4, prob=c(0,0,1,0))[1] i was expecting that to return a 3 every time while this is not exactly what i am using it for, i need the capabilities to deal with zeros (as the
2002 Apr 08
2
changing the form of a list
i have a 2 x n matrix that is a paired list of connections, i am working with that looks something like: 1 2 1 3 1 5 2 1 2 3 3 1 3 2 4 5 5 1 5 4 for later operations it would be helpful if i could change this into the form of: 1 2 3 5 2 1 3 3 1 2 4 5 5 1 4 the initial list is randomly generated and the max number of times that any one number can appear is previoulsy defined by a limiting
2002 Apr 17
1
concat
i have a function that returns a list containing a variety of variable types i am trying to run the function multiple times and return the output into a variable with a semi-consistent naming pattern i.e., for ten trials i want to return the list into variables trial1,trial2,...trial10 is there a generic way to get this to happen i have a similar process that does the same thing to an external
2009 Jun 20
1
error ellipse
Dear All, I have a data set with the following structure: [A], [a], [B], [b] where [A] and [B] are measurements and [a] and [b] are the associated uncertainties. I produce [B]/[A] vs. [A] plots in R and would like to show uncertainties as error ellipses (rather than error bars). Would this be relatively easy to do in R? I would appreciate any help on this Thanks a lot Tibi
2009 Dec 20
2
as.Date question
All! This piece of code: zzz1 <- as.POSIXct("1999-03-18", tz="CET") zzz2 <- as.POSIXlt("1999-03-18", tz="CET") zzz1 == zzz2 as.Date(zzz1) as.Date(zzz2) yields TRUE for "zzz1==zzz2", but the two dates returned by as.Date are different: > as.Date(zzz1) [1] "1999-03-17" > as.Date(zzz2) [1] "1999-03-18" I'm
2010 Jan 09
1
lattice, add text to xyplot
Hello listers, Does anybody know how to add text to an xyplot without whipping out the existing curve? That's all. For instance, Lets say you generate a graph like this A <- data.frame(x = rnorm(100), y = rnorm(100)) xyplot(y ~ x, data = A) How would you add 'Hello world'? I tried 6.02E23 different partial solutions found on the web and failed. I just need one EXAMPLE that
2010 May 11
1
functions sample() and S.SI()
Hello, I need to select a sample from a small population using simple random sampling without replacement. I've found two possibilities in R, the function sample() and the function S.SI() in the package TeachingSampling, but I don't know which one is better. Can someone help me? Thank you -- Lourdes Molera Peris M?todos Cuantitativos para la Econom?a y la Empresa Facultad de Econom?a
2009 Jun 19
2
correlation between categorical data
Hi all, In a data-frame, I have two columns of data that are categorical. How do I form some sort of measure of correlation between these two columns? For numerical data, I just need to regress one to the other, or do some pairs plot. But for categorical data, how do I find and/or visualize correlation between the two columns of data? Thanks!
2009 Nov 26
2
Multivariate problems . . . with 200 resposes variables and 1 explanatory variable
How should I analysis it in R ???? all the resposes variables are ordinal from 0 to 10. and the explanatory variable is a factor ... -- View this message in context: http://old.nabble.com/Multivariate-problems-.-.-.-with-200-resposes-variables-and-1-explanatory-variable-tp26522912p26522912.html Sent from the R help mailing list archive at Nabble.com.
2011 Feb 06
1
random interaction effect in lmer
Hi dears while modeling an interaction random effect in lmer i receive the instantaneous error message > ldlM4<-lmer(ldl~rt*cd4+age+rf+pharmac+factor(hcv)+ + hivdur+(rt:cd4|id),na.action=na.omit,REML=F) *Warning message: In mer_finalize(ans) : false convergence (8) * I think the matter lies in syntax, 'cause i sistematically receive the same message even when changing response... PS:
2010 Jan 22
1
Sata and R users GLM methods translation
Hello, I am learning R and I am fluent in Stata and I try to translate part of my Stata code to R to check the reliability of the data under R. I have a proportion variable as a dependent variable pQSfteHT . Independent variables are dummies for two categorical variables called dQSvacrateHTQuali3 and cluster_3. I am fitting a model with the Stata command below: glm pQSfteHT dQSvacrateHTQuali3_2
2011 Sep 08
2
The elegant way to test if a number is a whole number
Hi, x <- 0.2*5 is.integer(x) gives me FALSE because R stores it as a float number, right? Is there an elegant way to work around that problem? Right now I'm using x <- 0.2*5 round(x) == x which returns TRUE. But more strictly I should use all.equal(), right? I somehow just don't like the--pardon--ugliness of those pieces of code. Maybe there is a beautiful
2009 Aug 03
2
lme funcion in R
Hi, R users, I'm using the "lme" function in R to estimate a 2 level mixed effects model, in which the size of the subject groups are different. It turned out that It takes forever for R to converge. I also tried the same thing in SPSS and SPSS can give the results out within 20 minutes. Anyone can give me some advice on the lme function in R, especially why R does not converge?
2009 Nov 28
2
R on Large Data Sets (again)
Dear R users, I’ve search the R site for help on this topic but it is hard to find a precise answer for my questions. Which are the best options to overcome the RAM memory limitation problems when using R on “large” data sets (such as 2 or 3 million records)? - Is the free available version of R (as opposed to the one provided by REvolution Computing) compatible with a windows 64-bit
2009 Dec 03
4
Data Manipulation Question
Can R support data manipulation programming that is available in the SAS datastep?  Specifically, can R support the following: -          Read multiple dataset one record at a time and compare values from each; then base on if-then logic write to multiple output files -          Load a lookup table and then process a different file; based on if-then logic, access and lookup values in the table
2009 Sep 06
3
linear mixed model question
Hello, I wanted to fit a linear mixed model to a data that is similar in terms of design to the 'Machines' data in 'nlme' package except that each worker (with triplicates) only operates one machine. I created a subset of observations from 'Machines' data such that it looks the same as the data I wanted to fit the model with (see code below). I fitted a model in