ot;
[1] "Date"
Why is this apparently not a bug? Are there other types that change type
when looped over?
Kind regards
Mikkel
_
*Mikkel Grum*
+44 7377337321 (mobile)
mikkelgrum (Skype)
[[alternative HTML version deleted]]
___
iODBC appears no longer to come standard with OSX, so I installed unixodbc and
set it up following instructions here:
http://www.boriel.com/en/2013/01/16/postgresql-odbc-connection-from-mac-os-x/
I connected to my remote database with isql -v mydsn. No problem. Then I tried
from R:
You'll need to tell us what class you time variable is in, e.g. the output of
str(AB), but the following might work:
for (i in unique(as.character(AB$time)) {
Intervall - AB[as.character(AB$time) ==i, ]
...
}
Depending on the format, as.numeric( ) might work too.
Regards
Mikkel
On Saturday,
You might want to try:
assign(d[1], read.csv(yourfile.csv))
...
write.csv(d1, yourfile.csv, append = FALSE)
Regards
Mikkel
On Friday, October 11, 2013 2:53 PM, Dan Abner dan.abne...@gmail.com wrote:
Hi everybody,
I thought I was using the get() fn correctly here to loop over multiple
data
iODBC appears no longer to come standard with OSX, so I installed unixodbc and
set it up following instructions here:
http://www.boriel.com/en/2013/01/16/postgresql-odbc-connection-from-mac-os-x/
I connected to my remote database with isql -v mydsn. No problem. Then I tried
from R:
You'll need to tell us what class you time variable is in, e.g. the output of
str(AB), but the following might work: for (i in unique(as.character(AB$time)) {
Intervall - AB[as.character(AB$time) ==i, ]
...
} Depending on the format, as.numeric( ) might work too. Regards
Mikkel
On Saturday,
Hi
This seems to work:
spdata$color - ifelse(spdata$change 0, red, green)
plot(spdata$date, log(spdata$close), col = spdata$color)
Regards
Mikkel
On Friday, October 11, 2013 5:14 PM, Mubar simon.keu...@student.unisg.ch
wrote:
Hi
I have a question regarding plots in R. I have data from the
, Mikkel Grum wrote:
Dear useRs
I need to do graphs with dates in different languages on Ubuntu.
In Windows the following will plot the date axis labels in Spanish:
random.dates - as.Date(2001/1/1) + 70*sort(stats::runif(100))
language - Spanish
Sys.setlocale(LC_TIME, language)
plot(random.dates
Dear useRs
I need to do graphs with dates in different languages on Ubuntu.
In Windows the following will plot the date axis labels in Spanish:
random.dates - as.Date(2001/1/1) + 70*sort(stats::runif(100))
language - Spanish
Sys.setlocale(LC_TIME, language)
plot(random.dates, 1:100, xaxt=n)
alldat$yearmonth - substr(alldat$mydate, 1, 7)
From: Anna Dunietz anna.duni...@gmail.com
Cc: r-help@r-project.org r-help@r-project.org
Sent: Wednesday, September 14, 2011 3:21 AM
Subject: Re: [R] Deleting Rows based on Factor and Time Period
Mikkel - thank you
http://www.sciviews.org/zooimage/
might be useful.
From: Jose Bustos Melo jbustosm...@yahoo.es
To: r-help@r-project.org r-help@r-project.org
Sent: Wednesday, September 14, 2011 4:06 PM
Subject: [R] Image processing and analysis with R
Hello everyone,
I'm
plot(clust)
rect.hclust(clust, h = 0.65)
Is that what you wanted?
- Original Message -
From: Madeleine Seeland madeleine.seel...@in.tum.de
To: r-help@r-project.org
Cc:
Sent: Tuesday, September 13, 2011 9:25 AM
Subject: [R] help with hclust and cutree
Hello,
I would like to cut a
The following will get you the first stock in each week. Is that useful?
install.packages(surveillance)
library(surveillance)
alldat$year - isoWeekYear(alldat$mydate)$ISOYear
alldat$week - isoWeekYear(alldat$mydate)$ISOWeek
alldat - alldat[order(alldat$year, alldat$week), ]
Code - c(rep(NY14/3070, 3), rep(NY14/5459, 2))
Code - as.factor(Code)
absdiff - c(2, 4, 1, 5, 7)
df - data.frame(Code, absdiff)
which(
paste(df$Code, df$absdiff) ==
paste(
aggregate(df$absdiff, by = list(df$Code), min)$Group.1,
aggregate(df$absdiff, by = list(df$Code),
You are missing \\ between Documents and settings and Administrator.
- Original Message -
From: dbonneau daronnebonn...@gmail.com
To: r-help@r-project.org
Cc:
Sent: Tuesday, September 13, 2011 10:59 AM
Subject: [R] space in directory name
Hi, I am trying to read a text file located in
I've created a chart with times that employees have entered data on named tasks
as in the following example:
Employee - c(rep(Tom, 127),
rep(Dick, 121),
rep(Sally, 130)
)
Time - c(seq(as.POSIXct(2011-09-12 07:00:00), as.POSIXct(2011-09-12
14:00:00), 200),
seq(as.POSIXct(2011-09-12 07:00:00),
I have a script that runs as a cron job every minute (on Ubuntu 10.10 and R
2.11.1), querying a database for new data. Most of the time it takes a few
seconds to run, but once in while it takes more than a minute and the next run
starts (on the same data) before the previous one has finished.
--- On Thu, 5/26/11, Marc Schwartz marc_schwa...@me.com wrote:
From: Marc Schwartz marc_schwa...@me.com
Subject: Re: [R] Time and db precision
To: Mikkel Grum mi2kelg...@yahoo.com
Cc: R Help r-help@r-project.org
Date: Thursday, May 26, 2011, 8:22 AM
On May 25, 2011, at 6:25 PM, Mikkel Grum
I have a loop that regularly checks for new data to analyse in my database. In
order to facilitate this, the database table has a timestamp column with the
time that the data was inserted into the database. Something like this:
while () {
load(timetoken.Rdata)
df - sqlQuery(con,
I would like to do inserts into a database table, but do updates in the fairly
rare cases in which the inserts fail. I thought tryCatch might be the way to do
it, but I honestly do not understand the help file for tryCatch at all.
I thought something like this might work:
for (i in seq(along =
...@stats.ox.ac.uk wrote:
From: Prof Brian Ripley rip...@stats.ox.ac.uk
Subject: Re: [R] tryCatch?
To: Mikkel Grum mi2kelg...@yahoo.com
Cc: R Help r-help@r-project.org
Date: Wednesday, May 4, 2011, 12:21 PM
Start with try(): you may find it
easier to understand.
if(inherits(try(call1), try-error
I'm trying to insert rows of a data.frame into a database table, or update
where the key fields of a record already exist in the table. I've come up with
a possible solution below, but would like to hear if anyone has a better
solution.
# The problem demonstrated:
# Create a data.frame with
Subject: Re: [R] INSERT OR UPDATE
To: Mikkel Grum mi2kelg...@yahoo.com
Cc: R Help r-help@r-project.org
Date: Monday, May 2, 2011, 5:15 PM
Rather than selecting all the keys, then having R loop through them, why not
have postgres do it for you with something like:
#go through each line in our entry
If you want all your NAs in the column GPAX to be 2.36, you could also say
df2$GPAX[is.na(df2$GPAX)] - 2.36
If you want only that specific NA to be 2.36, you are probably better off using
df2$GPAX[rownames(df2) == 156] - 2.36.
--- On Sun, 1/23/11, Den d.kazakiew...@gmail.com wrote:
From: Den
I run a batch file with the following command in Windows XP:
C:\R\R-2.12.1\bin\Rterm.exe --no-save --no-restore C:\users\me\file.R
C:\users\me\file.out 21
Is there any way to get only the output of R in file.out, without getting all
the code from file.R too?
Any help greatly appreciated,
...@comcast.net wrote:
From: David Winsemius dwinsem...@comcast.net
Subject: Re: [R] batch file output
To: David Winsemius dwinsem...@comcast.net
Cc: Mikkel Grum mi2kelg...@yahoo.com, r-help@r-project.org
Date: Tuesday, December 28, 2010, 8:30 AM
On Dec 28, 2010, at 8:27 AM, David Winsemius wrote
When I use grid.rect to print a multi-coloured grid, it is incredibly slow
compared to a single colour grid, or even a two colour grid.
I've set out some simplified examples below. This is something I run literally
thousands of times a day, so I would greatly appreciate any hints on how I
the pdfs. I'm not sure to what extent the Windows graphics drivers
affects the png and pdf drivers?
Mikkel
--- On Wed, 10/20/10, Paul Murrell p.murr...@auckland.ac.nz wrote:
From: Paul Murrell p.murr...@auckland.ac.nz
Subject: Re: [R] need for speed on grid.rect
To: Mikkel Grum mi2kelg
attached packages:
[1] RODBC_1.3-1Revobase_3.2.0
All assistance appreciated.
Best regards,
Mikkel
***
Mikkel Grum
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman
Is there any way to pause R for a gvien time period, i.e. without the
need for user intervention? I've got a loop that I want to have work
as hard as it can as long as there is data coming in, but when there
is no new data, I would like it to pause before checking again.
Something like in the
Hi,
I'm drawing lattice dotplots with time along the x-axis as in:
C -data.frame(c(A, B),Sys.time()+ rnorm(50)*3600)
names(C) - c(Name, Time)
dotplot(Name ~ Time, data = C, horizontal = TRUE)
On my display, the x-axis shows tick marks every two hours. I would like to
show something more
?
***
Mikkel Grum
+254 20 2345285
+254 720639599 (mobile)
mikkelgrum (Skype)
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
?
***
Mikkel Grum
+254 20 2345285
+254 720639599 (mobile)
mikkelgrum (Skype)
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
Does this help?
a - c(1,1,1,1,1,2,2,2,2,2)
b - c(4,5,6,5,4,7,8,9,8,7)
c - c(a,b,c,d,a,b,b,a,d,d)
A - cbind(a,b,c)
test - ftable(a,b,c)
test.df - data.frame(test)
test.df[test.df$Freq != 0, ]
Doesn't quite give the layout you seem to want, but effectively removes the
zeros.
Mikkel
Is the following expected behaviour for a date used in
an ifelse function?
date - Sys.Date()
date
[1] 2007-12-30
ifelse(TRUE, date-1, date)
[1] 13876
ifelse(FALSE, date-1, date)
[1] 13877
ifelse(TRUE, as.character(date-1), date)
[1] 2007-12-29
if (TRUE) {date}
[1] 2007-12-30
It would seem
and what
size of number I was looking for.
cheers,
Mikkel
- Original Message
From: Prof Brian Ripley [EMAIL PROTECTED]
To: Mikkel Grum [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Sunday, November 25, 2007 2:05:37 PM
Subject: Re: [R] truncated fields with RODBC
You need to study
will get the default
of varchar(255)).
The 64k limit is for reading, not writing.
As ever, full details and a reproducible example are
needed for people to
help you fully.
On Sat, 24 Nov 2007, Mikkel Grum wrote:
I'm changing some functions from storing data in
SQLite (using
I'm changing some functions from storing data in
SQLite (using RSQLite) to storing it in PostgreSQL
(using RODBC). When trying to store very long
character fields I get the following message:
sqlSave(pg, Grids, rownames = FALSE, append =
TRUE)
Warning messages:
1: In odbcUpdate(channel,
?dbWriteTable
row.names = F
Tonight's top picks. What will you watch tonight? Preview the hottest shows on
Yahoo! TV.
http://tv.yahoo.com/
__
Dear useRs,
Why are the rotated blue and yellow boxes in the example below clipped outside
of 6 x 6 inch window in the middle of the page?? Where does the 6 x 6 inch
window come from? I would like to make use of the entire page.
library(grid)
pdf(file = FarmMaps.pdf, paper = a4)
40 matches
Mail list logo