search for: hultstrand

Displaying 18 results from an estimated 18 matches for "hultstrand".

2008 Oct 30
3
Save a function existing library
..., I am fairly new to R and I have created a function that I use quit frequently. I was wondering if there is away to save this function in an existing library so I can call it by using the function name once the library is loaded? Thanks, Doug -- --------------------------------- Douglas M. Hultstrand, MS Senior Hydrometeorologist Metstat, Inc. Windsor, Colorado voice: 970.686.1253 email: dmhultst at metstat.com web: http://www.metstat.com
2010 Jun 23
2
Unique Data Frame Name?
...ata frames (name1 and name2). Any suggestions are appreciated. Thanks, Doug # Example for (i in 1:2) { x=c(1,2,3,4) y=c(10,20,30,40) G <- paste("name", i, sep="") G[i] <- data.frame(x,y) } -- --------------------------------- Douglas M. Hultstrand, MS Senior Hydrometeorologist Metstat, Inc. Windsor, Colorado voice: 720.771.5840 email: dmhultst at metstat.com web: http://www.metstat.com
2010 Jun 28
3
data frame row statistics (mean)?
...)) avg <- rep(NA,length(d[,1])) for (i in 1:length(d[,1])) { avg[i] = mean(d[i,1:4], na.rm=TRUE) } # Final Output wanted. st1 st2 st3 st4 avg 1 1 2 5 6 3.50 2 2 5 5 5 4.25 3 3 6 NA 7 5.33 4 4 7 7 8 6.50 -- --------------------------------- Douglas M. Hultstrand, MS Senior Hydrometeorologist Metstat, Inc. Windsor, Colorado voice: 720.771.5840 email: dmhultst at metstat.com web: http://www.metstat.com
2008 May 20
3
R for loop question
...thin the datafile). The x1,x2 data will later be called for plotting the data. Below is a clip of the for loop I am using, any suggestions? k = 1 for (i in 1:length(stats$hour)) { "x(i)" = dataset[k,(3:15)] k = k+1 } Thanks, Doug -- --------------------------------- Douglas M. Hultstrand, MS Senior Hydrometeorologist Metstat, Inc. Windsor, Colorado voice: 970.686.1253 email: dmhultst at metstat.com web: http://www.metstat.com
2009 Dec 01
3
paste name in for loop?
...,100,0.011 22,1,0.003 22,5,0.005 22,10,0.00824 22,25,0.04258 22,50,0.057 22,100,0.101 23,1,2.10328 23,5,2.02755 23,10,1.93808 23,25,1.78408 23,50,1.67407 23,100,1.568 24,1,3.20842 24,5,3.09228 24,10,2.95452 24,25,2.71661 24,50,2.54607 24,100,2.38108 -- --------------------------------- Douglas M. Hultstrand, MS Senior Hydrometeorologist Metstat, Inc. Windsor, Colorado voice: 970.686.1253 email: dmhultst at metstat.com web: http://www.metstat.com
2010 Jan 05
3
R matching lat/lon pairs from two datasets?
...i,4],data[i,6],data[i,8],data[i,10],data[i,12],data[i,14],data[i,16],data[i,18],data[i,20],data[i,22]) print(freq_ppt) return_value <- approx(freq_ppt,yrs,xout=data2[i,3]) print(return_value) } Thanks for your help, Doug -- --------------------------------- Douglas M. Hultstrand, MS Senior Hydrometeorologist Metstat, Inc. Windsor, Colorado voice: 970.686.1253 email: dmhultst at metstat.com web: http://www.metstat.com
2010 Feb 04
3
Legend symbol?
...sed)","Exponential") } legend("topleft", legend=leg.txt, col=c("black","yellow","red","orange","blue","black"), pch = c(16,16,16,16,1,1), cex=0.85 ) Thanks, Doug -- --------------------------------- Douglas M. Hultstrand, MS Senior Hydrometeorologist Metstat, Inc. Windsor, Colorado voice: 970.686.1253 email: dmhultst at metstat.com web: http://www.metstat.com --------------------------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: ZR_lewis_pre_20100115_1400.png Type: im...
2009 Mar 24
3
Display Equation on plot
...s? I am using the plot() function to create the plot/.png. Example: lm_mod <- lm(data1~data2) intercept = 48.54 slope = 0.4856 I want to display equation on a plot as y=0.4856x+48.54 Any thoughts or suggestions are appreciated. Thanks, Doug -- --------------------------------- Douglas M. Hultstrand, MS Senior Hydrometeorologist Metstat, Inc. Windsor, Colorado voice: 970.686.1253 email: dmhultst at metstat.com web: http://www.metstat.com
2009 Oct 15
2
Data frame search and remove questions
...38.71 -93.16 1.016 320 3.717 10 38.95 -95.67 1.000 5 8.553 > d.new lat.add lon.add PPT.add Z.add sd_dif 1 37.08 -95.57 0.508 106 -999.000 2 38.85 -94.73 1.000 5 -999.000 Thanks for all the help, Doug -- --------------------------------- Douglas M. Hultstrand, MS Senior Hydrometeorologist Metstat, Inc. Windsor, Colorado voice: 970.686.1253 email: dmhultst at metstat.com web: http://www.metstat.com
2009 Nov 13
2
data frame subsets?
....3 0.6 64 102.6 d.1 <- d[d$t >= 1.0,] d.2 <- d.1[d.1$t < 2.0,] How can I make d.1 and d.2 into one step? I have tried several different methods such as example below. d.1 <- d[d$t >= 1.0, && d$t < 2.0,] Thanks, Doug -- --------------------------------- Douglas M. Hultstrand, MS Senior Hydrometeorologist Metstat, Inc. Windsor, Colorado voice: 970.686.1253 email: dmhultst at metstat.com web: http://www.metstat.com
2013 Jan 29
2
Netcdf and Raster Package Questions, Need .asc File for GIS
...RNER_LAT = 48.005f ; :SOUTH_WEST_CORNER_LON = -167.995f ; :DX = 0.01f ; :DY = 0.01f ; 2) Is there a better way to read a netcdf file and create an .asc file that can be read into GIS (GRASS or ArcGIS) *_Code Used_* # get net cdf file, big file wget ftp://ftp.nohrsc.nws.gov/pub/staff/fall/Hultstrand/NOAH32.201204110000.d01.nc ################## #### COMMANDS ## ################## # look at netcdf file header info ncdump -h NOAH32.201204110000.d01.nc ########## # Start R # ########## library(ncdf) ex.nc = open.ncdf("NOAH32.201204110000.d01.nc") print(ex.nc) summary(ex.nc)...
2010 Jan 20
2
Plot frame border to start at zero?
...=0.95) mtext("Index Hour", side=1, line=2) mtext("Incremental Precipitation (in)", side=2, line=2.5) mtext("Accumulated Precipitation (in)", side=4, line=2) dev.off() Thanks for all your help, Doug --------------------------------- Douglas M. Hultstrand, MS Senior Hydrometeorologist Metstat, Inc. Windsor, Colorado voice: 970.686.1253 email: dmhultst at metstat.com web: http://www.metstat.com --------------------------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: mass_curve_33.355-111.325_1147_Zone1.pn...
2009 Oct 22
1
Cairo package, png files within for loop are black?
...ab=expression("Area(mi" ^ 2 * ")"), xlab="Maximum Average Depth of Percipitation (inches)", scales=list(y=list(log=TRUE)), ylim=c(1,1000000), type='l', auto.key=list(space='right')) dev.off() -- --------------------------------- Douglas M. Hultstrand, MS Senior Hydrometeorologist Metstat, Inc. Windsor, Colorado voice: 970.686.1253 email: dmhultst at metstat.com web: http://www.metstat.com
2010 Jun 14
1
Times series data file?
...s. I have attached a small subset text file of data (two observations). Any thoughts would be very helpful. # Read in data file data <- read.table("file.txt", skip=4, header=F) temp <- data$V4 elev <- data$V3 Thank you, Doug -- --------------------------------- Douglas M. Hultstrand, MS Senior Hydrometeorologist Metstat, Inc. Windsor, Colorado voice: 720.771.5840 email: dmhultst at metstat.com web: http://www.metstat.com --------------------------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: file.txt URL: <ht...
2009 Sep 01
1
Read multiple files into dataframe?
...000001.00 00007.52,0000005.00 00007.32,0000010.00 00006.91,0000020.00 00005.90,0000050.00 00005.02,0000100.00 00004.09,0000200.00 00003.55,0000300.00 00002.96,0000500.00 00002.27,0001000.00 00001.64,0002000.00 00000.82,0005000.00 00000.77,0005360.00 -- --------------------------------- Douglas M. Hultstrand, MS Senior Hydrometeorologist Metstat, Inc. Windsor, Colorado voice: 970.686.1253 email: dmhultst at metstat.com web: http://www.metstat.com --------------------------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: da_zone1_15hr_1166.s...
2009 Oct 27
1
New vector based on if/else statement within for loop?
...in length(w)) { if(Z[i]>=24 && P[i]<=1) { w[i] = 88 } else { w[i] = 77} } d.f <- data.frame(Z,P,w) d.f Z P w 1 25 0 0 2 23 1 1 3 28 2 2 4 29 3 3 5 30 4 4 6 31 5 5 7 28 0 0 8 29 1 1 9 22 5 77 -- --------------------------------- Douglas M. Hultstrand, MS Senior Hydrometeorologist Metstat, Inc. Windsor, Colorado voice: 970.686.1253 email: dmhultst at metstat.com web: http://www.metstat.com
2009 Nov 16
1
lmomco package and confidence limits?
...GEV parameters to fill-in the table below? Xi (location) = 35.396 Alpha (scale) = 1.726 Kappa (shape) = 0.397 Year, Return value, CI_u, CL_l 2, 36.0, 5, 37.3, 10, 38.0, 25, 38.5, 50, 38.8, 100, 39.0, Thank you for your help/suggestions, Doug -- --------------------------------- Douglas M. Hultstrand, MS Senior Hydrometeorologist Metstat, Inc. Windsor, Colorado voice: 970.686.1253 email: dmhultst at metstat.com web: http://www.metstat.com
2009 Jun 09
1
Cairo Package Installation
...x-gnu-library/2.8/Cairo' The downloaded packages are in /tmp/RtmpILmmXw/downloaded_packages Warning message: In install.packages("Cairo") : installation of package 'Cairo' had non-zero exit status > Thanks, Doug -- --------------------------------- Douglas M. Hultstrand, MS Senior Hydrometeorologist Metstat, Inc. Windsor, Colorado voice: 970.686.1253 email: dmhultst at metstat.com web: http://www.metstat.com