Displaying 20 results from an estimated 1000 matches similar to: "set the bahavior that R deal with missing values?"
2003 Jan 08
2
Undocumented bahavior of as.integer() (PR#2430)
as.integer() truncates doubles toward zero, as Splus does (at least v. 6.1
under Windows does). Thus:
> look <- (10 * seq(14)) - 76
> 10 * (73.1 + look)
 [1]   71  171  271  371  491  586  681  791  886  981 1101 1201 1301 1401
> as.integer(10 * (73.1 + look))
 [1]   70  170  270  370  490  586  681  791  886  981 1101 1201 1301 1401
... It is not documented in R! I propose appending
2009 Oct 09
2
Creating a Clustered-Stacked Column Chart
Hi all,
   In R, is there some functions or ways to create a Clustered-Stacked
Column Chart as the example in the following page
http://peltiertech.com/Excel/ChartsHowTo/ClusterStack.html?
  I have browsed the R Graph Gallery (http://addictedtor.free.fr/graphiques/)
and searched the R site, and didnot find an appropriate method to do it.
  Anybody has met this problem before?
  Thanks a lot.
2012 Jul 05
4
Exclude missing values on only 1 variable
Hello,
I have many hundred variables in my longitudinal dataset and lots of
missings. In order to plot data I need to remove missings.
If I do
> data <- na.omit(data)
that will reduce my dataset to 2% of its original size ;)
So I only need to listwise delete missings on 3 variables (the ones I am
plotting).
data$variable1 <-na.omit(data$variable1)
does not work.
Thank you
2007 Sep 13
2
handle dates in R?
Dear Rusers,
  I have some data in .csv file like "2004-8-1" and "2004-10-1", and i  need
to convert them into days from the origin (January 1, 1960).
I have tried the function date.mmddyyyy(), but cannot get it. Anybody can
show me how to handle the date data?
  Thanks very much!
My dataset like:
time
2004-8-1
2004-10-1
2001-9-1
2002-9-1
-- 
With Kind Regards,
2006 Jul 02
2
how to recode in my dataset?
Dear Rusers,
 My question is about "recode variables". First, i'd like to say
something about the idea of recoding:
 My dataset have three variables:type,soiltem and airtem,which means
grass type, soil temperature and air temperature. As we all known, the
change of air temperature is greater than soil temperature,so the
values in those two different temperaturemay represent different
2009 Jul 29
2
cannot allocate a vector with 1920165909 length
Dear Rusers,
 The error for the  following was that it cannot allocate the vector of
length 1920165909.
a <- expand.grid(se1=0:100/100, sp1=0:100/100, se2=0:100/100, sp2=0:100/100,
DR=0:100/100)
 How to solve it? Maybe setwd(dir) can, i am not very sure about it.
 Any ideas about it?
	[[alternative HTML version deleted]]
2006 Nov 07
1
plot questions?-errors in persp(x1, x2, y) and contour(x1, x2, y)
Dear Uwe Ligges ,
  I still can't finish it.
*> aa*   #my data
    x1 x2      y
5    0.05  6 4.4180
1    0.50  3 2.6979
4    0.50  9 2.9000
7    0.95  6 2.6230
8    0.95  6 2.9078
9    0.95  6 2.6727
3    1.40  3 2.4203
2    1.40  9 2.5329
6   1.85  6 2.4867
*> attach(aa)*
*> persp(x1,x2,y*
error in persp.default(x1, x2, y) : increasing 'x' and 'y' values expected
2008 Jun 02
2
High resolution figures for a paper?
Dear Rusers,
  My manuscript has been conditionally accepted recently. The problem to
generate the high  resolution figures in R for the manuscript cannot be
solved by me.
The journal editor ask me to generate the figures with a minimum resolution
of 500 dpi. I have tried the *menu-driven method* to save the figures as
JPEG (100% printed quality), but the results seem not to be very good. I
have
2009 Jan 17
4
Where to find the source codes for the internal function in stats package
Dear all,
  I want to see the source codes for "dchisq(x, df, ncp=0, log = FALSE)",
but cannot find it.
I input "dchisq" in the R interface, and then enter, the following message
return:
> dchisq
/*****************************************************/
function (x, df, ncp = 0, log = FALSE)
{
    if (missing(ncp))
        .Internal(dchisq(x, df, log))
    else
2011 Dec 06
1
Problem with clusplot
Dear all
I'm trying to run a cluster analysis with R
Here are the commands:
mydata <- na.omit(matrix) # listwise deletion of missing
mydata <- scale(matrix) # standardize variables 
 fit <- kmeans(mydata, 8) # 8 cluster solution
 # get cluster means 
aggregate(mydata,by=list(fit$cluster),FUN=mean)
 # append cluster assignment
 mydata <- data.frame(mydata, fit$cluster) 
2012 Nov 09
1
Remove missings (quick question)
A colleague wrote the following syntax for me:
D = read.csv("x.csv")
## Convert -999 to NA
for (k in 1:dim(D)[2]) {
    I = which(D[,k]==-999)
    if (length(I) > 0) {
        D[I,k] = NA
    }
}
The dataset has many missing values. I am running several regressions on
this dataset, and want to ensure every regression has the same subjects.
Thus I want to drop subjects listwise for
2007 Jan 30
2
R and S-Plus got the different results of principal component analysis from SAS, why?
Dear Rusers,
  I have met a difficult problem on explaining the differences of principal
component analysis(PCA) between R,S-PLUS and SAS/STATA/SPSS, which wasn't
met before.
  Althought they have got the same eigenvalues, their coeffiecients were
different.
  First, I list my results from R,S-PLUS and SAS/STATA/SPSS, and then show
the original dataset, hoping sb. to try and explain it.
 
2013 Apr 25
1
[LLVMdev] Optimize away sqrt in simple cases?
Am Dienstag, 23. April 2013, 22:50:51 schrieben Sie:
> [...]
> Giving more-than-expected precision can be just as bad for the user as less.
>  It tends to come up in situations where the optimization would break some
> symmetry, the same way that aggressively forming FMAs can break user code. 
> [...]
> 
> It boils down to the fact that giving excess precision in
>
2009 Jul 27
2
How should i change the SAS Codes into R Codes?
Dear R users,
  I have a SAS codes with several loops in it, and i hope to use R to do the
same task. The SAS codes are as follows,
/*to generate the dataset*/
DATA Single_Simulation;
 DO se=0 to 1 by 0.01;
  DO sp=0 to 1 by 0.01;
   DO DR=0 to 1 by 0.01;
    TR=(DR+sp-1)/(se+sp-1+1.0e-12);
    Adjust_Factor=TR/(DR+1.0e-12);
    OUTPUT;
   END;
  END;
 END;
RUN;
/*to select some data*/
DATA
2006 Nov 07
1
plot questions?
Dear Rusers,
  I want to know which function in R can perform the following tasks:
1.surface-data grid(x,y,z)  #which could be done in splus, the name was from
splus's options of graph
2. contourplot(x,y,z)     #which could be done in splus
By the way, where can i find some useful materials to learn to plot
3-dimensionel graphs?
Thanks!
-- 
With Kind Regards,
oooO:::::::::
(..):::::::::
2007 Aug 25
1
How can i inhibit this work "Please select a CRAN mirror for use in this session "?
Dear Rusers,
  When i start R, there always the following work to do first, how should i
cancel it?
*--- Please select a CRAN mirror for use in this session ---*
  I don't know why it does so, maybe i have done something unintentionally.
  Thanks.
-- 
With Kind Regards,
oooO:::::::::
(..):::::::::
:\.(:::Oooo::
::\_)::(..)::
:::::::)./:::
::::::(_/::::
:::::::::::::
2007 Sep 14
1
Calculate the angles for a point dataset?
Dear Rusers,
  I'd like to take the cases of cancer of the larynx in chorley(spatstat) to
explain my question.
  I want to join the points of cancer of the larynx with the disused
industrial incinerator to generate lines, and then calculate the angles of
these line comparing the horizontal line?
  How can i get it? It seems to be difficult to get the angles
  Thanks a lot.
-- 
With Kind
2025 Jan 14
1
Weird and changed as.roman() behavior
Hello,
I don't know what's changed or how to figure out why as.roman() started
to work different way lately on Mageia Cauldron. Cauldron is the
latest development version of Mageia Linux.
Expected bahavior:
> as.roman(strrep("I", 1:5))
[1] I   II  III IV  V  
Current behavior:
> as.roman(strrep("I", 1:5))
[1] I    II   III  IV   <NA>
Warning message:
In
2005 Apr 12
1
Re: Problems with Excel & MS Word files (EVEN - still ANY ideas?)
Since applying the two patches you emailed me (one for cpu load, one for MS
Excel issues):
All is working fine now except MS Word; don't know if it's entirely related
or a separate issue all together, but figured I'd post the details and see
if you can think of anything; here's the behaior:
Word (apparently) creates a "~384somerandomnamefile.tmp" when a user saves,
the
2007 Aug 17
3
Is there any good tools to facilitate us to create R functions?
Dear R users,
  We have some programs for the specific task in our research, but they were
very commonly used. We want to make some functions for them, anybody can
recommend any good tools to facilitate us to create R functions even without
going deep into the theories of R functions ?
  Any suggestions or help are greatly appreciated.
-- 
With Kind Regards,
oooO:::::::::
(..):::::::::