Displaying 9 results from an estimated 9 matches for "hvidberg".
Did you mean:
hedberg
2008 May 21
3
Converting a 'difftime' to integer - How to???
...9;difftime' object. How do I get an Integer value from that?
I tried severel things, incuding the following:
> dd <- as(d,"numeric")
Error in .classEnv(thisClass) :
unable to find an environment containing class "difftime"
Sugestions appriciated...
:-) Martin at Hvidberg.net
2011 Jan 27
1
normalizing prizes to a specific year - how to?
...mean
dafP$Pno <- dafP$P * (mean(dafP$P)/dafP$Yav) # Prize Normalized by Year
Can any one comment on this:
*
This code only normalizes so all year get the same mean. How would
I go about 'normalizing' to a specific year, eg. 2010?
Best Regards
Martin
--
*/ Martin Hvidberg
Tanggårdsvej 22
2680 Solrød
tlf.: 35 83 01 91
email: Martin@Hvidberg.net /*
[[alternative HTML version deleted]]
2008 Jun 10
2
How to join data.frames and vectors of different length, in an inteligent way?
...alues (dafSmap[,2] * Ay(for a relevant year) / Ag)
I tried to write:
vecAA <- dafSamp[,2] * Ay[which(Ay[,1]==dafSamp[,1]),2] / Ag
but the result is all NAs :-( Might have seen that coming, Not the same length...
Question: How do I go about making such calculation?
:-) Martin Hvidberg
Here is the code in full, if you want to try it...
dafSamp <- data.frame(cbind(c(1972,1984,1969,1976,1999,1996,1976,1984,1976),c(117,73,92,113,80,78,98,106,99)))
Ag <- mean(dafSamp[,2])
Ag
Ay <- aggregate(x=dafSamp[,2], by=list(dafSamp[,1]), FUN='mean')
Ay
Cy <- agg...
2006 Nov 03
2
Installing a package - and making it work?
...updating HTML package descriptions
> dbf <- read.dbf("test.dbf")
Error: could not find function "read.dbf"
>
Note thet the last line contains an error.
Is the package installed or not?
How do I get access to use the functionality it offers??
:-? Martin Hvidberg
[[alternative HTML version deleted]]
2008 Oct 17
2
Text (eg. summary) to text file, Howto?
...t support output to file
cat(), but it claims that 'sum1' is a list
write, but that just uses cat()...
The script goes something like this:
...
lmMax <- lm(NUMAMMON ~ YYYY*MM*DD)
sum1 <- summary(lmMax)
# help needed here... how to dump sum1 to a small text file???
...
:-? Martin at Hvidberg.net
2002 Nov 25
2
Q: Segmentation fault at all commands ?
...32.5) on an
DIGITAL AlphaServer 800 5/500
The program starts up nicely but exits immediately with a "Segmentation
fault" at the first command. It seems that it doesn't matter what command, I
tried q(), help(), version, licence(), x<-1, etc.
All comments are welcomed.
:-? Martin Hvidberg
> ------
> Martin Hvidberg
> M.Sc. Physical Geography, Researcher
>
> Danish Ministry of Environment
> National Environmental Research Institute (NERI)
> Department of Atmospheric Environment (ATMI)
>
> Email: mhv at dmu.dk
> Url: www.dmu.dk
>...
2007 Apr 18
1
Changing axis lable text size in plots?
Dear list
I'm plotting ( boxplot() and plot() ) some data for a publication.
The editor would like the text labels on the plots in a larger font.
I'm doing something like this:
<snip>
jpeg(
filename = "D:/Martin/Work/CleanPath/RAF1%03d.jpg",
width = 1000,
height = 600,
pointsize = 12,
quality = 100,
bg = "white",
res = 96,
restoreConsole = TRUE
)
2003 Feb 17
2
Q: libreadline.so.4.1 problems on Alpha/Linux
...licence(), help(),
demo() or any other of the sugested commands I get an error: "Segmentation
fault" and the progam exits to the shell prompt.
Any sugestions are welcomed...
----------------------------------------------------------------------------
-----------------------------
Martin Hvidberg
Geographer, M.Sc.
National Environmental Research Institute Phone(direct): +45 46 30 11
55
Dept. of Atmospheric Environment Phone: +45 46 30 12
00
Frederiksborgvej 399 Fax: +45 46 30 12 14
Box 358 E-mail: mhv at dmu.dk
DK-4000 Roskilde Location:
55?41'43.1"N 12?06'06.6&q...
2008 Aug 25
2
Using sample() with a data frame ?
I have a data frame (daf1), that holds +80000 records, and 10 variables (i.e. 10 columns and some 80000 rows)
> length(daf1)
[1] 10
> length(daf1[,1])
[1] 83805
I would like to sample() e.g. 10000 records from this. I use:
> daf2 <- sample(daf1, 1000, replace = FALSE, prob = NULL)
Error in `[.data.frame`(x, .Internal(sample(length(x), size, replace, :
cannot take a sample larger