Displaying 20 results from an estimated 10000 matches similar to: "extract day or month as in Splus"
2009 Nov 02
3
problems with read.csv
Dear all,
I''d like to ask help on R code to get the same results as the following
Splus code:
>indata<-importData("/home/data_new.csv")
>indata[1:5,4]
[1] 0930 1601 1006 1032 1020
I tried the following R code:
> indata<-read.csv("/home/data_new.csv")
> indata[1:5,4]
[1] 930 1601 1006 1032 1020
I''d like the first
2010 Feb 05
2
sum a particular column by group
Dear all,
I have a table like this:
> eds
R.ID Region Gender Agegr Time nvisits
1 1 A F 60--64 1:00 1
2 2 O F 55--59 1:20 1
3 3 O F 55--59 3:45 3
4 4 S M 60--64 1:10 3
5 5 W F 55--59 12:30 1
6
2009 Nov 24
1
keep empty subsets using aggregate
Dear all,
I am struggling with a small problem. By using aggregate, the empty subsets
are removed. I need each empty subset to be 0. Any suggestions will be
appreciated.
Code:
edref = aggregate(rep(1,times=dim(eds)[1]),list(eds[,11], eds[,7],
eds[,27]), sum)
Thanks in advance,
Betty
[[alternative HTML version deleted]]
2006 Aug 10
2
day, month, year functions
Hi list,
I'm trying to turn a date into something productive. (Not what you may be thinking....)
I want three functions so I could take a "date" object and get the day of week, month, and year from it.
xx <- as.Date("2006-01-05")
month(xx) equal 1
day(xx) equal 5
year(xx) equal 2006
I'm aware of the weekdays() and months() functions in the base package. But
2008 May 31
2
Segfault in imap_bodystructure_write when searching
Whenever I try to search on my dovecot test install, dovecot dies. It
immediately spawns a new process, which the client tries to connect to, and
send search commands to, causing that to die, and so forth. This loop means I
have to kill either the server or the client.
Running Dovecot 1.0.13 from/on Debian testing, rebuilt with vpopmail support
and no other source changes. Vpopmail version is
2006 May 19
1
problem with pdf() R 2.2.1, os 10.4.6
Hi,
I'm trying to write a histogram to a pdf
pdf()
plot<-hist(c, xlim=c( 0.69, 0.84), ylim=c(0,100))
when I try to open the pdf I can't open it, there is always some
error . Is there something I should add to make it run under this
operation system? I had problems upgrading to 2.3 (problem
downloading packages) so I'm not sure an upgrade will work out with
me. I just want a
2007 Mar 12
1
timeDate & business day
I have a daily time series and have two questions to get some help with.
Firs,t I have dates in simple numeric values. e.g.
ymd
[1] 20050104 20050105 20050106 20050107 20050110 20050111 20050113 20050114
[9] 20050118 20050120 20050121 20050124 20050125 20050126 20050127 20050128
[17] 20050201 20050202 20050203 20050204
Now, I'd like to compute statistics, e.g. acf, by business days. So, I
2011 Jul 19
2
timeDate with month designated by three letters.
Dear R Experts:
I am trying to convert a date and time character field to timeDate where the month is presented as three letters, such as "JUN" for June, etc.
This is an example of the full character field:
"04-MAY-11 1428"
What is the proper format syntax?
I've tried
timeDate("04-MAY-11 1428",format="%d-%m-%y %H%M")
but only get
GMT
[1]
2007 Jan 28
2
help with RandomForest classwt option
Hello there,
I am working on an extremely unbalanced two class classification problems. I
wanna use "classwt" with "down sampling" together. By checking the rfNews()
in R, it looks that classwt is not working yet. Then I looked at the
software from Salford. I did not find the down sampling option. I am
wondering if you have any experience to deal with this problem. Do you
2005 Feb 22
1
Memory error in Mac OS X Aqua GUI v1.01 with cluster package functions
I'm sorry if the answer to my problem is buried in the archives. I
have limited experience with R and I couldn't find a solution to my
particular problem. I am running Mac OS X Aqua GUI v1.01 on a new G5
running os 10.3.8 with a 1.8Ghz processor and 1GB of sdram. I just
downloaded bioconducter a week ago and I'm trying to cluster a matrix
I created with a simulation with
2008 Jan 02
1
wants to get all parents with no children, etc
To all:
hi,
i have implemented the associations in my models
so i have a Parent model that has many Children model
but i need to get a list of Parents that do not have children
or
Parents that have just 2 children
or Parents that have children whose name is ''James'', or ''Sarah'', or
''Betty''
or Parents whose children do not have names like
2007 Dec 13
1
counting weekday in a month in R
Hi,
I am trying to count weekday of the month using R. For example, 1/4/2001
is the 4th weekday of Jan, and 1/5/2001 is the 5th weekday of the month, and
1/8/2001 is the 6th weekday of the month, etc. I get as far as extracting
the weekdays from a sequence of dates (see below). But I have not yet
figured out a fast way of counting without using a For Loop. Does anyone
know how to do such counting
2017 Sep 19
3
what do you think about write.table(... qmethod = "excel")?
Last week one of our clients reported trouble with a csv file I
generated with write.table. He said that columns with quotes for
character variables were rejected by their data importer, which was
revised to match the way Microsoft Excel uses quotation marks in
character variables. I explained to them that quoted character
variables are virtuous and wise, of course, but they say Microsoft
Excel
2006 May 09
1
problem accessing trees after read.nexus from ape package
Hello,
I've been trying to figure out how to access the individual elements
from an object of class phylo.
I am reading in 201 trees created by paup as below.
> read.nexus("A_30knj_200t.txt", tree.names= NULL) -> anj30
> anj30[1]
$tree1
$edge
[,1] [,2]
[1,] "-1" "-2"
[2,] "-2" "-3"
[3,] "-3" "1"
2006 May 31
2
timeSeq and TimeDate analog in R ?
Hi All : I am attempting tomove a large amount of code from Splus to R and I was hoping that there was an equivalent in R of the Splus functions timeSeq and timeDate ?
I did an RSiteSearch but nothing came up ?
If the equivalent functions are part of some package, that's fine.
Thanks a lot.
Mark
2006 Sep 05
4
Ferret 0.10.2 - Index#search_each() and :num_docs
Hi,
I seem to be having trouble getting more than 10 hits from
Index#search_each since upgrading to 0.10.2 (ie, this was working in
0.9.4). Maybe a bug, as the #search_each doesn''t seem to use the options
parameter any more ?
Thanks,
Neville
===========================================
require ''rubygems''
require ''ferret''
p Ferret::VERSION
idx =
2011 Mar 07
1
Associating the day of week to a daily xts object
I have the following xts objetct "temp"
> str(temp)
An ?xts? object from 2010-12-26 to 2011-03-05 containing:
Data: num [1:70, 1] 2.95 0.852 -0.139 1.347 2.485 ...
- attr(*, "dimnames")=List of 2
..$ : NULL
..$ : chr "t_n"
Indexed by objects of class: [POSIXct,POSIXt] TZ: GMT
xts Attributes:
NULL
> temp
t_n
2010-12-26
2002 Oct 04
1
Samba servers and Mac OS X clients
I am trying to set up a file server using RedHat or Mandrake Linux. The
Linux server is running netatalk. Clients include Mac OS 9.1 and 9.2,
Windows 2K, ME, MacOS X (10, 10.1 and Jaguar).
I seem to have connectivity issues with the clients running OS X, and was
wondering if this is supported in Samba. My server is running version
2.2.6pre2, which was recently upgraded from 2.2.3. Thanks.
--
2008 Jan 06
3
need help
Hi,
I'm Roslina, PhD student of University of South Australia, Australia
from school Maths and Stats. I use S-Plus before and now has started
using R-package. I used
to analyse rainfall data using julian date. Is there any similar
function that you can suggest to me to be used in R-package? Thank you
so much for your attention and help
[[alternative HTML version deleted]]
2017 Jun 05
2
months not working with local language (weekdays does)
Hi,
I want to reporte some strange behaviour with the "months" function, from
base R.
When using "months" to extract months from a date column, I'm getting the
months in english, when I was expecting months in spanish.
When using "weekdays" to extract days of week from a date column, I'm
getting the the days in spanish (as expected).
My understanding is