Water engineer here. The standard approach is to 1) get the storage vs.
elevation data from the designers of the reservoir or, barring that, 2)
get the bathymetry data from USBR or state DWR, or, if available, get
the DEM data from USGS if the survey was done before the reservoir was
built or 3
Nick,
I've also made colors transparent by pasting the hex equivalent of, say,
0.3*256 = 76.9 to the hex color code. e.q. for black it might be
"#004d" and the 4d is 77 in hex. That way you don't need to convert
back and forth so much. If col is "#00" the transparent version is
tcol <-
ork? I shouldn't think so, but ...
Cheers,
Bert
On Tue, Jan 24, 2023 at 1:43 PM David Stevens
mailto:david.stev...@usu.edu>> wrote:
Simple expressions on plots, such as parse(text='x >= y') have been
resulting in just a placeholder box (x box y and not the symbol) in my
Simple expressions on plots, such as parse(text='x >= y') have been
resulting in just a placeholder box (x box y and not the symbol) in my R
plot labels in windows, R v 4.2.2. I haven't down an exhaustive test but
<= and >= have this behavior.
plot(1,1,main=parse(text="x >= y"))
Has anyone els
The way I did this recently is to look into the .dbf file that comes
with the shapefile group from ESRI or your feature site, and search the
feature names for the one I want. This gives you an index to use to
search for the feature in the actual shapefile. Then, once the shapefile
is loaded int
Val
Another all-base R solution:
as.Date(strptime(gs$date,format="%m/%d/%y"))
or if you want to add a time field later
as.POSIXct(strptime(gs$date,format="%m/%d/%y")))
since strptime produces a list version of the date: class is POSIXt and the
subclass is POSIXlt, that can be convenient for e
I started a new session and entered
> rm(list=ls())
> install.packages(
+ c('lmerTest', 'quantreg', 'rmarkdown', 'SparseM'),
+ lib = .libPaths()[1L],
+ destdir = 'c:/myRLib'
+ )
And this is the result:
There are binary versions available but the
source versions are later:
binary
m.
Best
David
> install.packages(c("callr", "cli", "data.table", "english", "exactRankTests",
> "glmnet", "leafpop", "lmerTest", "multcomp", "plyr", "quantreg", "R.utils&q
Ivan - thanks for looking into this. My answers to your comments are below.
Cheers
David
On 12/13/2019 1:46 AM, Ivan Krylov wrote:
On Thu, 12 Dec 2019 15:48:13 +
David Stevens <mailto:david.stev...@usu.edu> wrote:
Certain R packages will not install properly on my Windows 10
co
d it. Seems good.
> I think you might find the discussion here to be relevant
>
> https://community.rstudio.com/t/cant-install-package-remotes-when-trying-to-install-devtools/34121
>
> Good luck,
> Eric
>
> On Thu, Dec 12, 2019 at 6:08 PM David Stevens wrote:
>
I'm unable to discover.
Best
David
On 12/12/2019 8:56 AM, Eric Berger wrote:
Apparently it does not like that the fact that your user 'David
Stevens' has a blank.
Looking at the documentation ?install.packages
it seems that if you modify your call to something like
install.packages
exit status
The downloaded source packages are in
�C:\Users\David
Stevens\AppData\Local\Temp\Rtmpk5NqrI\downloaded_packages�
both using RStudio 1.2.5019 and the Rgui.exe 3.6.2. I look in the download
folder and the callr_3.4.0.tar.gz is there but the installer can't find it.
This h
16434.
The nls() application is the easy part.
Good luck
David Stevens
On 5/4/2017 4:58 PM, Zachary Shadomy wrote:
> I am having some errors come up in my first section of code. I have no
> issue in plotting the points. Is there an easier method for creating a
> non-linear regression us
Berend - Unless you need the change in sales year by year, you might
consider looking at each company's sales over the years and use
regression or other type of trend analysis to get an overall trend...
Or, if not, simply divide diff(sales) by diff(fyear1) for each company
so at least you get t
Sorry to be a late comer to this problem but I'm having a similar
issue. My function is called by ode from deSolve
ADM1_C <- function(t,state,parameters,...){
with(as.list(c(state,parameters)), {
# do some stuff here and return a list containing a vector of
derivatives to ode
...
})
}
in w
By this, do you mean you want to use R to send data to Excel and have
Excel create the graph without your intervention, or to use R to create
a graph that looks like one of those that Excel produces?
David
On 4/14/2015 9:54 PM, jpm miao wrote:
Hi,
I understand that there're many great gr
There are other R-friendly editors too. Tinn-R and Notepad++ come to mind.
On 1/10/2015 11:04 PM, billy am wrote:
I concur.
Pls try it.
--
|
http://billyam.com || http://use-r.com || http://shinyserver.com (BET
acter(vnam)]]<-newvec[-1]
David
On 7/12/2014 8:33 AM, David Stevens wrote:
This is a (very) slightly modified version of Jim's reply that takes
the sender's email our of the list element and uses it as the name so
it can be accessed as newdat$'senders email' or newdat[['
This is a (very) slightly modified version of Jim's reply that takes the
sender's email our of the list element and uses it as the name so it can
be accessed as newdat$'senders email' or newdat[['senders email']]
newdat<-list()
for(sndr in unique(rdvdf$sender)) {
newvec<-
as.character(unique
Mark - good on you for jumping into R with both feet.
In addition to Simon's advice, the error message you are getting means
that the two endpoints (r.range in your case) do not give function
values that are of the opposite sign and so either the function has no
roots on the interval or has an
don't have a bunch of
different objects cluttering your workspace, just a single list.
On Tue, Jun 24, 2014 at 2:57 PM, David Stevens wrote:
Thanks to all for the replies. I tried all three and they work great. I was
misinterpreting the list = parameter in save(...) and I get your point about
ov
; wrote:
I think that you are looking for the `list` argument in `save`.
save( list=foo, file=paste0(foo, '.Rdata') )
In general it is best to avoid using the assign function (and get when
possible). Usually there are better alternatives.
On Tue, Jun 24, 2014 at 2:35 PM, David Stevens
;))
# though this generates " in save(get(foo), file = paste(foo, ".rData",
sep = "")) :
object ‘get(foo)’ not found", whereas
get(foo)
at the command prompt yields the contents of my.x
There's a concept I'm missing here. Can anyone help?
Regards
D
On closer inspection, change n=5 to n=10 in
major.ticks <- pretty(lims,n=5)
Then, I get 10^0, 10^1, etc. with all the minors. Is this what you want?
David
On 5/7/2014 10:32 AM, Shane Carey wrote:
Hey,
Im using the function below to create minor tick marks on log scale. It
only plots every se
060
[23] 5.698970 5.778151 5.845098 5.903090 5.954243 7.00 7.301030
7.477121 7.602060 7.698970 7.778151
[34] 7.845098 7.903090 7.954243
Note how they go from 1-2, then 3-4, 5-6, etc skipping every other decade.
Check the lines that produce minor.ticks
David Stevens
On 5/7/2014 10:32 AM, Sh
David Carlson's solution is obviously better! (sorry, I just saw it)
David Stevens
On 3/14/2014 4:57 PM, David Stevens wrote:
Renalda - your figure got stripped out. I'll assume you mean to have
depth on the vertical axis with a zero at the top and increasing (+)
depth as you go
4,6,8,10),labels=c(0,2,4,6,8,10) )# if you want labels at
0,2,4,6,8,10
David Stevens
Good luck
On 3/14/2014 1:55 AM, Renalda Munubi-Misinzo wrote:
I would like to have a plot with values in a reversed order (as shown in
fig 2). I tried to plot the graph in R using the following codes
plot(densi
Group - I'm having problems with the 'cluster' package. Installation
appears successful but attempts to load it with either library() or
require() result in the error message
Error in library(cluster) : there is no package called ‘cluster’
All that appears to be installed is cluster.dll in the
I have a question concerning axis scaling for pairs plots. My data set
has columns with differing units and I want a pairs plot with scatter+an
lm line+a correlation confidence ellipse for each lower panel. The 95%
confidence ellipse (using the ellipse package+a polygon) gives me an
ellipse tha
Hello all
I'm trying to create a plot similar to a plot.default(..., type='b')
with points plotted connected by lines that leave small gaps between the
end of the line and the point symbol, BUT, with each line segment's
color controlled by a category. plot... draws the line color uniformly
acc
on of Java directly from
Oracle. I then tried to load the rJava library and got
Error : .onLoad failed in loadNamespace() for 'rJava', details:
call: inDL(x, as.logical(local), as.logical(now), ...)
error: unable to load shared object 'D:/Users/David
Stevens/Documents/R/win-lib
That was it - detaching 'nlme' was the trick. Thanks Walmes and the rest.
David
On 5/1/2012 7:47 PM, David Stevens wrote:
> Yes - I also have nlme. Bad juju?
>
> David
>
> On 5/1/2012 1:32 PM, Walmes Zeviani wrote:
>> It could be a bad coexistence between pack
Yes - I also have nlme. Bad juju?
David
On 5/1/2012 1:32 PM, Walmes Zeviani wrote:
> It could be a bad coexistence between packages in the same R session. Are
> you using nlme and/or doBy packages too?
>
> Bests.
> Walmes.
>
> =
Folks
In trying to use lmer for a hierarchical model, I encountered the
following message:
Error in UseMethod("VarCorr") :
no applicable method for 'VarCorr' applied to an object of class "mer"
foo.mer <- lmer(y ~ TP + (TP|M),data=joe.q)
> head(joe.q[,1:5])
TP M AB Trty
1 1
I'm a bit clumsy about many things in R. Here's my problem. I'm trying
to build a square sparse matrix and populate it without looping (bad
practice, right). I have vectors of matched row/column pairs for which
the matrix entries have common characteristics and am look for a way to
fill the ent
I'm dipping my toe in graph theory and found that R has a rich
collection of network and graph tools. However, I can't seem to put my
finger on the solution to my problem. There are several procedures
available in R for finding a shortest path along edges between vertices
based on the cost of t
Thanks for the reply. Two things - I must have something missing because
copying and pasting your example gave me an error
... your definitions of nn
Output = do.call(as.data.frame(rbind),nn)
Error in as.data.frame.default(rbind) :
cannot coerce class '"function"' into a data.frame
The se
Group
It's unlikely I'm trying this the best way, but I'm trying to create a
data structure from elements like
nNode = 2
nn = vector("list",nNode)
nn[[1]] = list(Node = "1", Connect.up = c(NULL), Connect.down = c(2,3))
nn[[2]] = list(Node = "2", Connect.up = c(1), Connect.down = c(4,5))
are noisy. Kudos for
replication though. Let us know how it works out.
David Stevens
On 1/31/2012 7:11 AM, ram basnet wrote:
> Dear R users,
>
> I am struggling to fit expo-linear equation to my data using "nls" function.
> I am always getting error message as i highlighted bel
has a bunch of other useful experimental design goodies.
David Stevens
On 1/31/2012 12:34 PM, Sarah Goslee wrote:
> Which part? This might help:
> rep(1:5, each=9)
>
>
> On Tue, Jan 31, 2012 at 1:22 PM, Daniel Negusse
> wrote:
>> can someone tell me if there is an easier w
New York. This
type of discovery can feed into the prespecifying of groups and cluster
analysis as Bert suggested. It might be an independent way. I've done
similar analysis using R but I don't know of any packages. It isn't
difficult to code.
David Stevens
On 1/24/2012 4:12 P
nd automatically by
>
> install.packages("XML")
>
> and it was when I just tried it. Perhaps David has "CRAN (extras)"
> disabled in his list of selected repositories?
>
> Duncan Murdoch
>
>>
>> Michael
>>
>> On Sun, Jan 22,
ontrib/r-release/ReadMe
>
> but it suggests builds are available from Prof Ripley (to whom be
> honor and praise for ever and ever, amen!) here:
> http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/2.14/
>
> Michael
>
> On Sun, Jan 22, 2012 at 3:52 PM, David Stevens wro
http://www.omegahat.org/R";)
but got
Installing package(s) into 'D:/Users/David Stevens/Documents/R/win-library/2.14'
(as 'lib' is unspecified)
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
package 'XML' is not available (for R versio
lly about
differences between 32- and 64-bit code that comes from the compilers
and interfaces between R and shared libraries
Any and all help is appreciated!
David
On 1/16/2012 7:37 AM, Duncan Murdoch wrote:
> On 16/01/2012 8:55 AM, David Stevens wrote:
>> I installed RTools -
esponse/foo.dll':
LoadLibrary failure: %1 is not a valid Win32 application.
Any thoughts?
David S
On 1/15/2012 5:09 PM, Duncan Murdoch wrote:
> On 12-01-15 5:34 PM, David Stevens wrote:
>> I successfully used .Fortran to load and execute my fortran procedures
>> unde
I successfully used .Fortran to load and execute my fortran procedures
under WinXP and 32 bit R. Alas, the same isn't true with my next Windows
7/64 machine, R 2.14.1 (64 bit) and the gnu gfortran (64) compiler
(mingw64 v. 4.6.1). Though I'm able to compile the routines from the
command line us
Could it be
if(variable1.fac == 0 & variable2.num == 0) {variable3 = 1} #
brackets {} aren't strictly required for a one liner.
if(variable1.fac == 0 & variable2.num >= 0) {variable3 = 2} #
brackets {} aren't strictly required for a one liner.
if(variable1.fac == 1 & variable2.nu
iance with normality,
independence, and constant variance.
5. Collect Nobel prize!
This is one approach I've used with success. There are others, as hinted
at by Arne. Good luck - keep us posted on how it goes.
Regards
David Stevens
On 11/15/2011 12:17 PM, Arne Henningsen wrote:
>
#x27;re problem is more fundamental. Plot the data, then plot
a line that follows your model and ask yourself whether the model looks
like the data.
Good luck
David Stevens
On 10/24/2011 8:47 AM, mitra Rahmati wrote:
> mod = nls(A~ Amax * (1-exp(-b*Pot)),start=list(Amax=10,b=0.003))
I'm not an expert but some third party libraries won't recognize = as an
assignment for some objects (I learned this empirically) when the
assignment is made within a function. Using <- protects you from these
unknows, as you have discovered on your own.
Regards
David
On 6/27/2011 8:34 AM, Be
51 matches
Mail list logo