similar to: R: R: [Re:] function to replace missing values with median value?]]

Displaying 20 results from an estimated 1000 matches similar to: "R: R: [Re:] function to replace missing values with median value?]]"

2002 Sep 29
2
Problem on minima
2003 Jan 06
1
On nlm
Dear all, I have to minimize a (real) function in a loop (say i in (1:1000)) and store its ``$estimate'', via l2estim<-nlm(f.minimo,c(-.01,0.1))$estimate into a vector for further analisys. Since the function's behaviour is quite peculiar (in the sense that in the simulation study it may not have a minumum), sometimes I get the the warning Error in nlm(minimo, c(-0.01, 0.1),
2000 Jan 19
1
R for the Mac
Hello, usually work with S-plus and/or with R, which I do prefer, on a Window paltform. Now I downloaded R for the Mac (I run it on a G4 at home) but I found that many, too many functions are not available (svd, lm, glm and so on... but still the lapply is missing...!). I have ProFortran a C++ routine of my own but I can't pass them to that version of R. Is there anybody going to give a little
2002 Feb 25
4
replace NAs
Dear R community: it is possible to replace NA?s in a data frame with zeroes? what should I do? Thanks in advance Juan Pablo _________________________________________________________________ MSN Photos es la manera m?s sencilla de compartir e imprimir sus fotos: http://photos.latam.msn.com/Support/WorldWide.aspx -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
2011 Dec 01
1
efficient ways to dynamically grow a dataframe
Hi, I'm trying to write a small microsimulation in R: that is, I have a dataframe with info on N individuals for the base-year and I have to grow it dynamically for T periods: df = data.frame( id = 1:N, x =.... ) The most straightforward way to solve the problem that came to my mind is to create for every period a new dataframe: for(t in 1:T){ for(i in 1:N){ row = data.frame( id =
2002 Mar 29
2
order()
Hi, In the order() help file, there is an example like: a <- c(4, 3, 2, NA, 1) b <- c(4, NA, 2, 7, 1) z <- cbind(a, b) (o <- order(a, b)); z[o, ] How can I do something like "order a in ascending order, b in descending order"? And say I have a third vector c, and I'd like to add this to the previous condition "a ascending, b descending, c
2006 Feb 01
1
3d from file
Dear all, sorry if it's obvious but I wasn't able to find a solution by myself. I have a text file filled with 3 colums representing xyz coodinates (i.e. positions) of an objects. Can I have in R a 3d plot representig my object' s positions? I guess that I can but I don't know how. Any help is much appreciated Thanks a lot -a- Andrea Valle DAMS - Facolt?? di Scienze
2006 Apr 19
1
scatterplot3d: fractionary xrange
Dear all, I'm plotting this and I need x range = (-2.5, 2.5). require(scatterplot3d) scatterplot3d(1,1,1, pch=19, xlim=c(-2.5, 2.5), zlim=c(0,2), ylim=c(0,3), xaxs="i", yaxs="i") In any case, it seems that in the drawing range for x is (-3,3). I guessed I could have this kind of behaviour for ranges: plot(1,1, pch=19, xlim=c(-2.5, 2.5), ylim=c(0,3),
2002 Mar 18
4
Plot 3d
There exists a plot 3d functions (or similar) in R? Thanks, ======================================== Cezar Freitas (ICQ 109128967) IMECC - UNICAMP Campinas, SP - Brasil -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe"
2002 Mar 19
5
matrix with fix number columns but variable number rows
I have to store a number of vectors of the same length. I know the length but I do not know the number of vectors. How can I store them as they are created (they are created one by one)? -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or
2002 Mar 20
3
tex/latex output?
Is it possible to write the output/results (redirect) to a latex file? Jeff. Jeff D. Hamann Hamann, Donald & Associates, Inc. PO Box 1421 Corvallis, Oregon USA 97339-1421 Bus. 541-753-7333 Cell. 541-740-5988 jeff_hamann at hamanndonald.com www.hamanndonald.com -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read
2006 Apr 18
1
adding lines to scatterplot3d
Hi to all, I usually use R for simple 2D graphs so now I cannot solve the following problem (which I suppose very simple too). I'm using scatterplot3d. I want to add dotted lines parallel to the 3 axes, in order to create a sort of cage in the 3D box (so to represent subdomains in my dataspace). I saw that points3d can be used to draw points or lines to the existing plot but actually
2002 Aug 20
4
plot and bg
Hi all, I would like to plot some points and define the bg color of my graphics. But the bg parameter set is defined for the. whole graphic. In fact, i would like to use something like : box(bg=gray(0.9)). So, the background concerns only the plot region and not the main title, the x title and the y title. The option col for the function box() concerns the contour and there is no option
2002 Feb 11
4
Multiple graph pages
Dear R users: I am a relatively experienced Splus user but new to R, using the version for Windows 2000. Splus allows the user to generate multiple graph pages in the graph window. For example, if you have two plot(...) commands in the script than two pages in the graph window will be created. However, when I tried this in R, the second plot will just overwrite the first plot in the graph
2004 Jul 23
0
R: R: retrieve rows from frame assuming criterion [corrected]
Yes, paraphrasing Murphy I can say of myself: "Nothing seems to be able to stop a stupid thought in its pathway from the brain to the keyboard". :-) Sorry once again and thank for your patience. Stefano > -----Messaggio originale----- > Da: Prof Brian Ripley [mailto:ripley at stats.ox.ac.uk] > Inviato: venerd?? 23 luglio 2004 16.30 > A: Guazzetti Stefano > Cc: Luis
2007 Nov 13
1
R: Query an Access database based on a date attribute
It seems that Access needs that you surround the dates with a # symbol. You probably need something like. res <- sqlQuery(channel, "select * from test_table where market = 'atl-bos' and competitor = 'delta' and dd = #2007-11-20#") Hope this helps, Stefano -----Messaggio originale----- Da: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]Per
2009 Feb 02
0
Odd SMBD log message
Every so often I will see this in my log file: Feb 2 08:47:21 int-torino smbd[1034]: [2009/02/02 08:47:21, 0] lib/util_sock.c:get_peer_addr_internal(1607) Feb 2 08:47:21 int-torino smbd[1034]: getpeername failed. Error was Transport endpoint is not connected Feb 2 08:47:21 int-torino smbd[1034]: read_socket_with_timeout: client 0.0.0.0 read error = Connection reset by peer. Feb 2
2007 Mar 08
1
R: Searching and deleting elements of list
you could try mapply mydata2<-mapply("[", mydata, lapply(mydata, function(x) !x %in% A)) mydata2[[1]]<-A #to replace the obviously deleted elements of "A" mydata2 mydata2[[1]] mydata2[[2]] mydata2[[3]] mydata2[[4]] Stefano -----Messaggio originale----- Da: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch]Per conto di jastar
2004 Jul 23
0
retrieve rows from frame assuming criterion [corrected]
Still wrong: > x <- data.frame(a = sample(letters[1:3], 10, replace=T), b=1:10) > x a b 1 a 1 2 a 2 3 b 3 4 b 4 5 a 5 6 a 6 7 b 7 8 b 8 9 b 9 10 c 10 > subset(x, a == c("b", "c")) a b 3 b 3 7 b 7 9 b 9 10 c 10 > subset(x, a %in% c("b", "c")) a b 3 b 3 4 b 4 7 b 7 8 b 8 9 b 9 10 c 10 What matters
2005 Sep 23
2
Strange behaviour of as.Date function
Dear All, I'm happily extracting data of temperature from an oracle db under R via RODBC. After manipulating the extracted data I put them into a data.frame 'dati' which is as follows: > dati DATA tm. UDINE/RIVOLTO tm.TORINO/CASELLE 1 2005-07-01 22.35 23.80 2 2005-07-02 22.70 22.85 3 2005-07-03 23.80