similar to: grep and strings

Displaying 20 results from an estimated 30000 matches similar to: "grep and strings"

2003 Mar 31
4
Convert char vector to numeric table
I'm a great fan of read.table(), but this time the data had a lot of cruft. So I used readLines() and editted the char vector to eventually get something like this: " 23.4 1.5 4.2" " 19.1 2.2 4.1" and so on. To get that into a 3 col numeric table, I first just used: writeLines(data,"tempfile")
2007 Nov 23
1
complex conjugates roots from polyroot?
Hi, All: Is there a simple way to detect complex conjugates in the roots returned by 'polyroot'? The obvious comparison of each root with the complex conjugate of the next sometimes produces roundoff error, and I don't know how to bound its magnitude: (tst <- polyroot(c(1, -.6, .4))) tst[-1]-Conj(tst[-2]) [1] 3.108624e-15+2.22045e-16i
2004 Nov 16
2
beginner's problem in displaying large data
I got a sample data (let's call it sample.data), which is about 2200 by 15. I tried to take a look of all data >sample.data It shows only a part of data that I thought was a corner. It does not really affect my job, but I thought it is nice to have a look of all data. I can see individual records and they are fine. Is this normal because of buffer size or some reasons? Can I use other
2003 Feb 13
6
generic handling of NA and NaN and NULL
Hello everybody I have a generic problem which the following toy function illustrates: f <- function(n) { if(abs(n) < pi) { return(TRUE) } else { return(FALSE) } } I want it to return TRUE if abs(n)<pi and FALSE otherwise. f() is fine as far as it goes, but does not deal well with NA or NaN or NULL (I want these to signal some problem with the
2005 Jul 13
5
maps drawing
Hello, is there a package in R that would allow map drawing: coastlines, country/state boundaries, maybe topography, rivers etc? Thanks for any guidance, Mark
2005 Jul 02
2
Is it possible to use glm() with 30 observations?
I have a very simple problem. When using glm to fit binary logistic regression model, sometimes I receive the following warning: Warning messages: 1: fitted probabilities numerically 0 or 1 occurred in: glm.fit(x = X, y = Y, weights = weights, start = start, etastart = etastart, 2: fitted probabilities numerically 0 or 1 occurred in: glm.fit(x = X, y = Y, weights = weights, start = start,
2011 Sep 27
1
M-Splines design matrix
Hi Can any one inform me an r package used to fit Cubic M-splines or r functions used to have design and penalty matrices in fitting cubic  M-splines please? Thanks, Tigist [[alternative HTML version deleted]]
2004 Nov 01
3
Reading word by word in a dataset
Hello All, I'd like to read first words in lines into a new file. If I have a data file the following, how can I get the first words: apple, banana, strawberry? i1-apple 10$ New_York i2-banana 5$ London i3-strawberry 7$ Japan Is there any similar question already posted to the list? I am a bit new to R, having a few months of experience now. Cheers, John
2005 Mar 07
1
Density estimation when an end may not go to zero?
All the density estimators I've found in R seem to force the ends to go to zero. What can we do if we don't believe that, e.g., with something that might be a uniform distribution or a truncated normal with only observations above mu+sigma observed? The closest I could come to this was to artificially extend the numbers beyond the range, thereby forcing the density estimator
2003 Sep 30
3
fitdistr, mle's and gamma distribution
Dear R Users, I am trying to obtain a best-fit analytic distribution for a dataset with 11535459 entries. The data range in value from 1 to 300000000. I use: fitdistr(data, "gamma") to obtain mle's for the parameters. I get the following error: Error in optim(start, mylogfn, x = x, hessian = TRUE, ...) : non-finite finite-difference value [1] And the following warnings:
2005 Oct 10
1
lmer / variance-covariance matrix random effects
Hello, has someone written by chance a function to extract the variance-covariance matrix from a lmer-object? I've noticed the VarCorr function, but it gives unhandy output. Regards, Roel de Jong
2003 Sep 26
2
polar plotting of complex quantities
Hello to everybody, ... and sorry if the question has already been answered. I am dealing with complex numbers and need a way of plotting them on angular plots (2D and 3D). Is there a package that already manage this, or can somebody in this R-world who could help me with his skill ? Thanks to all. Have a nice week-end ! Olivier Eterradossi Ph.D., "PsychoSensory Properties of
2003 May 30
2
conversao para matriz
ol?, estou tentando converter a vari?vel b (abaixo) em uma matriz com duas colunas, sem muito sucesso, algu?m teria alguma sugest?o? muito obrigado, a<-outer(1:5,1:7,FUN="paste") b<- sample(a,10) [1] "4 2" "5 7" "3 3" "4 1" "4 5" "3 5" "5 2" "2 1" "3 7" "1 4" Matriz desejada: 4
2003 May 29
5
Comparison Operator
Does R have a comparison operator similar to the Like function, for example: a<-"Is a Fish" b<-"Fish" if(b in a){c<-TRUE} Michael R Howard Micron Technology Inc. Boise ID. Fab C Engineering Software (FCES) Software Engineer
2003 Aug 16
4
unclass
Have I been sleeping in class? rw1071 from CRAN, windows XP incidencia is made by a call to tapply > class(incidencia) [1] "array" > incidencia <- unclass(incidencia) > class(incidencia) [1] "array" Kjetil Halvorsen
2004 Sep 02
3
confidence intervals
Dear R users; Im working with lme and Id like to have an idea of how can I get CI for the predictions made with the model. Im not a stats guy but, if Im not wrong, the CIs should be different if Im predicting a new data point or a new group. Ive been searching through the web and in help-lists with no luck. I know this topic had been asked before but without replies. Can anyone give an idea of
2003 Apr 08
2
use of variable labels
The R documentation for some of the foreign package's functions says that the set of variable labels becomes attributes in the resulting data frame. Thus, e.g., 5="strongly agree", 4="agree", etc. I'm happy that the labels are being passed, but unfortunately, when R summarizes the data, it will list it only as categories, and doesn't deal with the
2003 Mar 24
1
how to show a section of a matrix neatly (or row by row) that satisfies some condition
Hi all, I want to show the rows of a matrix (100x3) of which some of its elements satisfy a certain condition. In particular, how can I display the 2 rows of my matrix one after the other and not all all elements of column 1 first, then column 2 and so on. See the following. > finest[finest[,1] > 10^3] [1] 4.960632e+13 3.612619e+04 7.668204e+12 1.001911e+04 8.886153e-01 [6]
2005 Feb 17
2
dumping the summary of lm to a text file
Hello list, I have a linear regression ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14) trt <- c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69) group <- gl(2,10,20, labels=c("Ctl","Trt")) weight <- c(ctl, trt) reg <- lm(weight ~ group) sreg <- summary(reg) and I would like to dump exactly what I see on the console with
2006 May 17
1
can Box test the Ljung Box test say which ARIMA model is better?
two ARIMA models, both have several bars signicant in ACF and PACF plots of their residuals, but when run Ljung Box tests, both don't show any significant correlations... however, one model has p-value that is larger than the other model, based on the p-values, can I say the model with larger p-values should be better than the model with smaller p-values? [[alternative HTML version