similar to: Replacing NAs with interpolated values

Displaying 20 results from an estimated 6000 matches similar to: "Replacing NAs with interpolated values"

2001 Sep 01
2
interpolation and numerical differentiation in R ?
Hi, I'm trying to determine if R is useful to me. I've browsed 'The Basics of S and S-Plus' (Krause & Olson), and like the logic of the language. However, I don't see an easy way to do things like this: * given a set of observations (x,y) (x and y equal-length vectors), and a 2nd set of abscissas x2, interpolate y at the new abscissas x2. (for now, I don't really
2001 Aug 27
4
plotting dendrograms from cluster analyses
Hi all, I have a bit of a newbie question here that I hope y'all can help with. I've run a cluster analysis using hclust on about 500 objects (using R1.3 under Win 2000). The problem is that the tips of the dendrogram are so close together on the plot that the labels overlap and are unreadable. I've used "cex" to reduce the label sizes but this isn't sufficient with so
2001 Sep 06
2
Array as time series?
Dear R-helpers, I have 4-dimensional atmospheric data (x,y,z,t), which I want to analyse on spatio-temporal diversities. As far as I understand there only exists the possibility to construct time series as two-dimensional matrices (mts). For the moment, I hold it in different objects: 1. a four-dimensional array for the spatial related analyses 2. a two-dimensional mts timeserie, which was
2001 Aug 08
3
"Transparent" background in graphics exported as metafiles
Hi, Under Windows, I am exporting graphs from R (in metafile -emf- format), and want to combine them using a graphic package. It happens that the background of the graph is represented by a filled rectangle (with the color given by bg=...). This is to be expected. However, I find no options to disable this and produce a graph with transparent background. Does such an option exist? If not, then
2001 May 29
5
Scripting capabilities for R
I'm in the final week of teaching a course to beginners using R and S-Plus. Since I forbade the students from using the "point-and-click" interface in S-Plus, they've become reasonably proficient at using the command line in both programs. Students really like the speed and ease-of-use of R for the vast majority of their projects. I think they'd switch to R completely
2013 Feb 13
5
spearman correlation and p-value as a matrix
I have two data matrices that I want to make the correlation between each column from data1 and each column from data 2 and also calculate the p-value Matrices dont have the same size and I tried such a script. > bg <- read.table (file.choose(), header=T, row.names) > bg > Otu00022 Otu00029 Otu00039 Otu00042 Otu00101 Otu00105 Otu00125 Otu00131 Otu00137 Otu00155 Otu00158 Otu00172
2002 Jan 27
1
cran@ci.tuwien.ac.at is not responding?
Hi, I have submitted a package to CRAN in ftp://ftp.tuwien.ac.at/incoming/pastecs_1.0.tar.gz. The R extension manual advises to send a mail to cran at ci.tuwien.ac.at about it, but it fails. I have also tried WWWadmin at ci.tuwien.ac.at. Are these email adresses still valid? Best, Philippe Grosjean ...........]<(({?<...............<?}))><............................... ) ) ) )
2009 May 22
5
Need a faster function to replace missing data
Dear List, I need some help in coming up with a function that will take two data sets, determine if a value is missing in one, find a value in the second that was taken at about the same time, and substitute the second value in for where the first should have been. My problem is from a fish tracking study. We put acoustic tags in fish and track them for several days. Location data is supposed
2001 May 16
5
the R package - relation to R project?
I stumbled across this link and was wondering if this has any relation to the R project. http://www.fas.umontreal.ca/BIOL/Casgrain/en/labo/R/index.html -jennifer ----------------------------------- J. Steinbachs, Ph.D. Computational Biologist http://compbiology.org ----------------------------------- -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing
2001 Jul 26
6
replacing values in a vector
Hi all, there is a vector v with several NAs. I want to create a new vector n of the same length as v and the same NAs as in v and tried this: n <- vector(length=length(v), mode="numeric") replace(n, which(is.na(v)), NA) but this does't work, all values in n are 0. What went wrong? Thanks, Sven -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
2002 Mar 15
1
creating time series from existing data
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Is it possible to create a time series from existing data frame? One column of that frame contains dates (like "01/01/01") and the second one the values. The period is non-regular (it is not strictly daily nor working-days-daily). Thank you. lukas - -- Lukas Kubin lukas.kubin at permonik.com phone: 00420603836180 -----BEGIN PGP
2013 Mar 07
1
create vector from indices interpolated values
Readers, Is it possible to create a plot command based upon the indices of missing values in a data set? dataset1<-read.table(text=' 10 2 20 NA 30 5 40 7 50 NA 60 NA 70 2 80 6 90 NA 100 9 ') dataset2<-read.table(text=' 0.2 0.4 0.1 0.9 0.2 0.3 1.1 0.7 0.9 0.6 0.4 ') The 'approx' function is used to obtain the interpolated values for 'NA' in dataset1.
2001 Oct 09
2
list of functions flagged with debug() or trace()
Hello all, Since I got no answer to my first mail, I suspect I did not formulate my question adequately, so I try again. In R, one can debug or trace a function 'foo' with debug(foo) or trace(foo), respectively. This leads to a special treatment of the function 'foo' until one enter undebug(foo) or untrace(foo). I would like to know if there is a convenient way to know at any
2001 Oct 07
2
plot logist
Hi, I make a glm analysis with binomial errors and its OK. Now I need plot the ajusted logist line in my points. How do I make it? | * * * * -> I need plot an ajusted | * * line in this points. | * * | * | * * | * * |* * * * |_________________________ Exist an abline like function for ajust others formulas? Exist in R
2001 Sep 14
1
Supply linear constrain to optimizer
Dear R and S users, I've been working on fitting finite mixture of negative exponential distributions using maximum likelihood based on the example given in MASS. So far I had much success in fitting two components. The problem started when I tried to extend the procedure to fit three components. More specifically, likelihood = sum( ln(c1*exp(-x/lambda1)/lambda1 + c2*exp(-x/lambda2)/lambda2
2002 Apr 09
2
Restricted Least Squares
Hi, I need help regarding estimating a linear model where restrictions are imposed on the coefficients. An example is as follows: Y_{t+2}=a1Y_{t+1} + a2 Y_t + b x_t + e_t restriction a1+ a2 =1 Is there a function or a package that can estimate the coefficient of a model like this? I want to estimate the coefficients rather than test them. Thank you for your help Ahmad Abu Hammour --------------
2001 Jun 12
2
a problem with rep() ?
Colleagues ---------------------------------- System info: Version 1.2.3 (2001-04-26) on NT ESS v. 5.1.18 using emacs ver. 20.4 ---------------------------------- I am wondering if there is a problem with the function rep(). Both the commands using rep() below were expected to produce 8 twos, but only the second did. x <- rep(2,40*(1-0.8)) length(x) y <- rep(2,40*0.2) length(y)
2001 Nov 29
3
pause/get input
Hi, Is there a simple command to pause a script until the user hits return? Alternatively, is there a command which prompts the user for some input and assigns the input into a variable? dave +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |David Richmond It works on a | + Dept. of Sociology complex scientific + |Saint Mary's College
2008 Dec 21
1
How can I get the interpolated data?
Hello,everybody! I am a beginner of R. And I want to ask a question. If anybody would help me, thank you very much ahead. I want to plot something like a response surface, and I find the "rsm" package. Some commands are like this: #code head library(rsm) CR = coded.data(ChemReact, x1 ~ Time, x2 ~ Temp) CR.rsm = rsm(Yield ~ SO(x1,x2), data = CR) summary(CR.rsm) contour(CR.rsm,x1~x2)
2001 Sep 04
2
fastest way to multiply each column of a matrix by a single vlaue
Let A be a m by n matrix and b a length n vector. What is the fastest vectorized code for doing for(j in 1:n) A[, j] <- A[, j]/b[j] ? solution 1: t(t(A)/b) solution 2: B <- matrix( rep(b, m), byrow=T, nrow=m ) A/B anything else? I have a program that uses this kind of operation million of times and I appreciate your input. Thanks. Jason Liao ===== Jason G. Liao Department of