similar to: Excel can do what R can't?????

Displaying 20 results from an estimated 400 matches similar to: "Excel can do what R can't?????"

2003 Jul 14
2
problem with coding for 'optim' in R
Hi, there I am a graduate student new to coding in S who is hitting a bit of a wall at present using an "optim" function. I am running into some troubles, and was hoping someone might be able to recognize where I am going wrong. As background: I have constructed a loop that carries out a 365-day calculation for a mass-balance model. Basically, the model depends on 2 variables (p,
2003 Jul 01
2
strange error message
Hi, there I have a loop that is producing data, but is also generating an error message that I can't understand. Here's the loop and the error message: > bio<-matrix(NA, ncol=9, nrow=366) > W<-NULL > M<- length(Day) #number of days iterated > > for (i in 1:M) + { + + + if (Day[i]==1) W[i] <- Wo else W[i] <- (W[i-1]+(Gr[i]/Ef)) + + + C<-
2003 Jul 01
1
Creating a loop that works....
Hi there, First off, thanks to everyone who has helped me so far. Sorry to keep pestering you all. I'm including my code here, and I will comment down it where it is that I am having problems figuring out how to write this damn thing. > temper <- scan("temp2.dat", na.strings = ".", list(Day=0, Temp=0)) Read 366 records > > Day <- temper$Day ;
2001 Nov 16
6
case conversion and/or string comparison
This is no doubt trivial but after searching the help files and the web, I cannot seem to find it. 1) How do I convert 'hgt' into 'HGT' in R? 2) How should I have used the help facilities to find this? At the end of the day, all I want to do is case insensitive string matching... i.e. 'if ("HGT" == 'hgt') print('this should be true')' I tried
2005 Feb 16
5
Repeating grey scale in graph?
Dear R users, Could somebody tell me why the grey color ramp is repeated in this graph, eventhough the ramp values go from 0 to 1? I must be missing something obvious, but I can not see it! z <- c(0.064329041,0.117243316,0.161565116,0.19923015,0.231642175,0.259835539,0.284571226, 0.038507288,0.094184749,0.140959431,0.180803984,0.215159105,0.245096084,0.271412845,
2000 Oct 26
2
persp plot question..
Dear All, I have been trying to to do this for a few days now. I can generate persp plot OK and can generate it in colour using the command persp(x,y,z,col=terrain.colors(20)) However, I was wondering if it is possible to shade the 3d surface like a contour plot. i.e. black for large z, white for small z, say Thanks in advance Colin
2010 Jan 30
1
Sweave - have Sexpr print 3 digits when the last is 0
Hi, I want 3 digits printed even if the last one is zero with \Sexpr{} For example: > ghg.06[12] [1] 0.2501008 I want: 0.250 What I've tried: \Sexpr{round(ghg.06[12],3)} 0.25 \Sexpr{format(ghg.06[12])} % set options(digits=3) in earlier rnw chunk 0.25 \Sexpr{round(ghg.06[12],4} %but I want 3 not 4 digits 0.2501 Thanks in advance. Elizabeth Stanny epstanny at gmail.com
2011 Jun 13
1
maintaining row connections during aggregate
Dear All, I have several sets of data such as this: year jday avg_m3s 1 1960 1 4.262307 2 1960 2 4.242308 3 1960 3 4.216923 4 1960 4 4.185385 5 1960 5 4.151538 6 1960 6 4.133846 ... There is a value for each day of multiple years. In this particular data set it goes up to 1974. I am am looking to obtain the minimum and maximum values for each year, but also know on which
2011 Sep 29
1
julian day form POSIXt object
hello all, this is my reproducible example data frame test<-structure(list(date = structure(c(1262300400, 1262304000, 1262304000, 1262307600, 1262307600, 1262311200, 1262311200, 1262314800, 1262314800, 1262318400, 1262318400, 1262322000, 1262322000, 1262325600, 1262325600, 1262329200, 1262329200, 1262332800, 1262332800, 1262336400, 1262336400, 1262340000, 1262340000, 1262343600,
2009 Jul 18
5
Hmisc, Design, summary.Design plot- changing confidence intervals, adding color or decreasing font size
Hi, 1. I want 95% not 99% confidence intervals in my summary.Design plot using the Design package. Putting conf.int=.95 as an argument in plot does not work. The default appears to be .99 not .95 as stated in the package Design manual (p. 164). 2. My sweave chuck is below and my output is attached as well as linked here: http://www.sonoma.edu/users/s/stanny/330A/project/ciplot.pdf 3.
2002 Apr 23
1
Bug: persp and colors (PR#1476)
Full_Name: Oliver Niggemann Version: Windows 1.4 patched OS: Windows NT 4.0 Submission from: (NULL) (141.169.250.14) Hello, I am working with the persp command. I want to change to color of the facets according to their z-value. The colors seems to be transposed, i.e. the color of a facet A seems to be used for a facet B which is a (defined?) way off.... An example: nx <- 21 ny <- 21
2003 Jun 30
0
Constructing loops in which i+1st element depends on ith
I feel greedy posting for help twice in one day- please forgive me, but the thesis can't wait. I have been trying to get an ?if else? statement working in a loop I am writing, in which I specify a variable value to 9.2 (Wo) on the first iteration, but for subsequent iterations, to adopt a value as a function of variables from the previous iteration. When I comment out the ?if else?
2008 Mar 05
1
problem with geepack
Hi all I am analyzing a data set containing information about the behaviour of marine molluscs on a vertical wall. Since I have replicate observations on the same individuals I was thinking to use the geepack library. The data are organised in a dataframe with the following variables Date = date of sampling, Size = dimensions (mm) Activity duration of activity (min) Water = duration of
2011 Jan 19
3
lme-post hoc
Hi all, I analysed my data with lme and after that I spent a lot of time for mean separation of treatments (post hoc). But still I couldn’t make through it. This is my data set and R scripts I tried. replication fertilizer variety plot height 1 level1 var1 1504 52 1 level1 var3 1506 59 1 level1 var4 1509 54 1 level1 var2 1510 48 2 level1 var1 2604 47 2 level1 var4 2606 51 2 level1 var3
2003 Jun 30
3
if else statements in R
Hi, there I am a grad student struggling to get my syntax right in a model I am building in R. I am trying to specify a variable,W, in a loop, such that on the first iteration, it is equal to Wo, my starting value, which I have already specified with Wo<-9.2 On any other iteration other than the first, I want W to equal the previous value of W in the iteration. plus an increment from
2004 Jul 29
1
Kudos to the R support team
Hi there, I just wanted to take a quick second to thank everyone who maintains this service- just in case you don't hear it enough, there are a plethora of people who rely on this service (as evidenced by the help archives), and even if they don't say it, are greatly thankful for what you do here. Not only are you providing a service to people who are learning R, but indeed helping
2005 Jun 28
2
boxplot by factor (Package base version 2.1.1) ( PR#7976)
The issue is not with boxplot, but with split. boxplot.formula() calls boxplot(split(split(mf[[response]], mf[-response]), ...), but look at what split() returns when there are empty levels in the factor: > f <- factor(gl(3, 6), levels=1:5) > y <- rnorm(f) > split(y, f) $"1" [1] 0.4832124 1.1924811 0.3657797 1.7400198 0.5577356 0.9889520 $"2" [1] -1.1296642
2008 Jul 09
1
matplot help
Hi, My question is how do I gain control over what values the X and Y axis show. Below is a sample plot I have made and want the X axis to represent a time vector with values taking the form Q1.60, Q2.60, Q3.60...Q1.90..etc...Currently the X axis starts with value 0 and increases by 1 through the end of the sample. win.graph() matplot(v.0,log.diff.v.6,type="l",lty=1, col=2,
2008 Jul 06
2
Issue with postscript figures using WinAnsi encoding
Hi there, I've hit a bump in writing postscript files with special characters in the WinAnsi encoding on a windows machine. Here's some sample code: ########################################### postscript(file = "test.eps", encoding="WinAnsi.enc", width = 3, height = 5.5, onefile = TRUE, horizontal=FALSE, family = "sans", title =
2007 Jan 23
1
How to evaluate an lm() object for generating warning statement in a function
Hi, there I tried this post on R-help but did not generate any replies, so I thought I might try the waters here since it's a more programming-based group. I have written a function that will allow me to calculate the variance components for a model II (random effects) single factor ANOVA (perhaps this is me re-inventing the wheel, but I handn't yet come across anything in R that does