ut the problem was in the dataset as I said.
Many Thanks,
Justin
Justin Allen
Housing Consultant, BRE<https://bregroup.com/>
T: 07807122647
From: Uwe Ligges
Sent: 04 June 2021 10:57
To: Allen, Justin ; R-help@r-project.org
Cc: Whiteley, Jonathon ; Foster, H
months ago. None of the arguments in read.spss() seem to
also stop this behaviour. I am currently on the most recent version of both R
and the package, as of 27/05/21, and am using RStudio Version 1.4.1106.
Any thoughts?
Many Thanks,
Justin Allen
p.s. your continued maintenance and additions to
earch internship in experimental design, linear algebra and data
compression, particle filters and bayes analyses). I do not expect to be
paid and am willing to commit to a project.
Yours sincerely,
Justin
*I check my email at 9AM and 4PM everyday*
*If you have an EMERGENCY, contact me at +4479386744
tex names) or some
index of each individual branch in tree. Does anyone have any ideas on how
to do this?
Yours sincerely,
Justin
*I check my email at 9AM and 4PM everyday*
*If you have an EMERGENCY, contact me at +447938674419 <07938%20674419>(UK)
or +60125056192 <+60%201
wikipedia link?
Yours sincerely,
Justin
*I check my email at 9AM and 4PM everyday*
*If you have an EMERGENCY, contact me at +447938674419(UK) or
+60125056192(Malaysia)*
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list -- To
I am however interested in generating a kernel density estimate with
an Epanechnikov kernel
fit<-density(data,kernel = "epanechnikov")
#is there a quick way to compute the samples and INCORPORATING THE
BANDWIDTH of the #kernel density estimate
Yours sincerely,
Justin
*I check my ema
Dear all,
Is it possible to avoid the use of \phantom with latex function ? when I run
latex(latex=FALSE,…) I get an error message.
When I use Format(big.mark= ‘’ ‘’) the result appear correct in R console but
not in Latex code. Is it a way to combine numprint with latex ? col.just=
‘n{#}{
would extend to using my mask function.
Anyway, thanks again for both of your help.
Cheers,
Justin
--
Justin Peter
Research Fellow
International Centre for Applied Climate Sciences,
University of Southern Queensland
West St, Toowoomba, QLD, 4350
Australia
Email: justin.pe...@usq.
ssing?
Thanks in advance for you help.
Kind regards,
Justin
--
Justin Peter
Research Fellow
International Centre for Applied Climate Sciences,
University of Southern Queensland
West St, Toowoomba, QLD, 4350
Australia
Email: justin.pe...@usq.edu.au<mailto:justin.pe...@usq.edu.au>
Ph: +61
data.frame(A=factor(c(1,1,1,1,1,1,2,2,2,2,2,2)),
> > + B=factor(c(1,1,2,2,3,3,1,1,2,2,3,3)),
> > + y=rnorm(12))
> >> mod <- aov(y ~ A+B, data=tmp)
> >> summary(mod)
> > Df Sum Sq Mean Sq F value Pr(>F)
> > A1 1.553 1.553 1.
= y ~ A + B)*
*Terms:*
*A B Residuals*
*Sum of Squares 0.872572 0.025604 16.805706*
*Deg. of Freedom 1 210*
*Residual standard error: 1.296368*
*Estimated effects may be unbalanced*
--
Yours sincerely,
Justin
*I check my email at 9AM and 4PM eve
6 1 1 0 0 0 1 0 0
7 1 1 0 0 0 0 0 1
8 1 1 0 0 0 0 0 1
--
Yours sincerely,
Justin
*I check my email at 9AM and 4PM everyday*
*If you have an EMERGENCY, contact me at +447938674419(
Hi,
I have a script that starts with some code to open a connection to an Oracle
database, however the code is crashing R/RStudio as soon as it runs. The code
does run successfully on another machine.
The script opens by loading the required RJDBC package:
library("RJDBC", lib.loc="C:/Program
[(5,6)]
etc
Is this correct?
I am sorry if I am asking too many questions on C. Please advise if I am
posting inappropriately.
--
Yours sincerely,
Justin
*I check my email at 9AM and 4PM everyday*
*If you have an EMERGENCY, contact me at +447938674419(UK) or
+601
erstand the commands in C that anyone knows about.*
--
Yours sincerely,
Justin
*I check my email at 9AM and 4PM everyday*
*If you have an EMERGENCY, contact me at +447938674419(UK) or
+60125056192(Malaysia)*
[[alternative HTML version deleted]]
__
o
> error strata becomes nonsensical otherwise. If you do have a balanced
> design, the error strata reduce to simple combinations of means and
> observation, so the aov() algorithm is quite inefficient, but to my
> knowledge nobody has bothered to try and do better.
>
> -pd
>
> &
test3)*
Df Sum Sq Mean Sq F value Pr(>F)
F1 0.0479 0.0479 0.059 0.830
G2 0.9762 0.4881 0.604 0.624
Residuals 2 1.6175 0.8087
--
Yours sincerely,
Justin
*I check my email at 9AM and 4PM everyday*
*If you have an EMERGENCY, contact me
erely,
Justin
*I check my email at 9AM and 4PM everyday*
*If you have an EMERGENCY, contact me at +447938674419(UK) or
+60125056192(Malaysia)*
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more
.
Does this makes sense?
On 19 July 2016 at 16:19, Michael Dewey wrote:
> Presumably it disappears because there is a unique value of ID for eac
> combination of S*x1 so they are indistinguishable.
>
>
> On 19/07/2016 12:53, Justin Thong wrote:
>
>> Why does the S:
0 DEF
162 3 0 DEF
163 3 0 DEF
164 3 0 DEF
--
Yours sincerely,
Justin
*I check my email at 9AM and 4PM everyday*
*If you have an EMERGENCY, contact me at +447938674419(UK) or
+60125056192(Malaysia)*
[[alternative HTML version dele
finding out about how R computes ~x1:x2:x3 or how R computes ~A:x1
emphasizing sequential nature of the way it computes, and models even more
complicated than this.
Yours sincerely,
Justin
*I check my email at 9AM and 4PM everyday*
*If you have an EMERGENCY, contact me at +447938674419(UK) or
I am looking to model the sum of a number of random variables with
arbitrary gamma distributions and an empirical dependence structure
that I obtain from data. Basically I observe all of the individual
pieces but I want to model their sum, as opposed to many copula
questions which observ
(b %*% x == b) { :
the condition has length > 1 and only the first element will be used
your help will be appreciate
Best Regard
Ushize Rutikanga Justin
Student at African Institute for Mathematical Sciences (AIMS) South Africa
E-mail:justinush...@aims.ac.za
Tel:+27717029144
Hi
I posted a question to this list, and received an email indicating that it is
awaiting moderation. However I have not received any feedback yet. If the
question is not appropriate, I’d like to know where or how I should post
differently, if possible.
Thanks and Regards
Justin Michell
(Pos/Examind ~ bio13 + bio15 + bio2 + bio3 + DstTClW + bio4 + NDVI
+ bio5 + bio9 + bio10 + bio14, weights = Examind, data = spatialVars,
family="binomial")
bootGLM.5 <- boot.stepAIC(fit.5, spatialVars, direction = "forward", alpha =
0.05, B = 1000)
Thanks very much
se is available ($dmid) which I had thought
to use when merging the new variables, however I don't know how to implement
this.
Thanks for your help,
Justin
-Original Message-
From: PIKAL Petr [mailto:petr.pi...@precheza.cz]
Sent: Friday, 26 July 2013 10:59 PM
To: Justin Delahunty;
subset the overall data
set into the three waves, then conduct the factor analysis on each (1 factor
CFA); it's just in a function to ease re-typing in a new workspace.
Thanks,
Justin
-Original Message-
From: PIKAL Petr [mailto:petr.pi...@precheza.cz]
Sent: Friday, 26 July 2013 7:35
imple examples of the most important functions ~~
Error: unexpected symbol in "~~ simple examples"
Execution halted
My question: How to correct the above error?
Thanks,
Justin
[[alternative HTML version deleted]]
__
R-help@r-project.o
Greetings,
I confess to being new to R, which I am exploring for some simulation
modeling purposes. I am a long time programmer in PHP.
I am having some trouble getting over the "steep learning curve" with
some very basic things which are probably just little "a-ha" things in
R. I have hunted and
or is y=y1+y2. So the variance of y is v(y)=v(y1)+v(y2)+cov(y1,y2).
Sampling theory indicate how to compute v(y1) and v(y2) but how can I compute
cov(y1,y2) ?
Can the survey package help me for that ?
Justin BEM
BP 1917 Yaoundé
Tél (237) 76043774
[[alternative HTML version de
ikely comparable, considering your response.
I am still confused about interpretation of interactions within an anova()
with an incomplete design, as mine is. Is the interaction term still
informative?
-
Justin Montemarano
Graduate Student
Kent State University - Biological Sciences
f.species 2.783 2 2.0738 0.12877
day:cond.time0.805 1 1.1994 0.27493
leaf.species:cond.time 0.568 1 0.8462 0.35888
day:leaf.species:cond.time 1.915 1 2.8539 0.09293
Residuals 118.091 176
>
e for Pearson's
test, and I should have had only 7 points, which would reflect the means of
my two variables for each individual animal across 10 days. Is this
appropriate or is there a means of accounting for repeated sampling with a
correlation test?
-
Justin Montemarano
Graduate Student
he bigml package enables the
> R community to easily take advantage of our highly scalable cloud based
> machine learning infrastructure, while using familiar R data structures and
> workflows.
Apologies for sending this e-mail a bit late.
Best,
-Justin
--
blog: http://www.scwn.net
aim
an equal number of rows once again. Obviously
baseline<-baseline[-2,] won't cut it here, since in my data set I have
thousands of people.
Thanks in advance
Justin
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing li
d: OO#.. Playing
> Research Engineer (Solar/BatteriesO.O#. #.O#. with
> /Software/Embedded Controllers) .OO#. .OO#. rocks...1k
> ---
> Sent from my phone. Please excuse my brevity
sn't a
recognized command in the sh shell...
Any help is appreciated,
Justin
> sessionInfo()
R version 2.15.0 (2012-03-30)
Platform: x86_64-pc-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF
Since I thought this was a cool question, I posted it to StackOverflow.
Vincent Zookynd's answer is amazing and really exercises the power of R.
http://stackoverflow.com/questions/10150161/ordering-117-by-perfect-square-pairs/10150797#10150797
On Fri, Apr 13, 2012 at 10:06 PM, Bert Gunter wr
I thought this was kinda cool! Here's my solution, its not robust or
probably efficient
I'd to hear improvements or other solutions!
Justin
sq.test <- function(a, b) {
## test for number pairs that sum to squares.
sqrt(sum(a, b)) == floor(sqrt(sum(a, b)))
}
ok.pairs
take a look at ?paste
paste(yourmatrix, sep='\t', collapse='')
On Wed, Apr 4, 2012 at 2:58 PM, kickout wrote:
> Having problems with the write.table function. I can write a tab delimited
> file just fine, but for each line in my matrix its inputs a carriage return
> when i dont want it to.
>
> F
ast step,
so if i missed i apologize...
Hope that helps,
Justin
On Mon, Apr 2, 2012 at 11:24 AM, Bcampbell99 wrote:
> Hi:
>
> I'm sure this seems like a rudimentary question, but I am not well versed
> with R syntax for lists. I have a ragged array from which I've removed
&g
You can also take a look at
http://stackoverflow.com/questions/7519790/assign-multiple-new-variables-in-a-single-line-in-r
which has some additional solutions.
On Fri, Mar 30, 2012 at 4:49 PM, Peter Ehlers wrote:
> On 2012-03-30 15:40, ivo welch wrote:
>>
>> Dear R wizards: is there a clean
>
>
>> -Original Message-
>> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
>> Behalf
>> Of Justin Haynes
>> Sent: Wednesday, March 28, 2012 1:24 PM
>> To: Markus Weisner
>> Cc: r-help@r-project.org
>> Subject:
In most regexs the carrot( ^ ) signifies the start of a line and the
dollar sign ( $ ) signifies the end.
gsub('^S S', 'S', a)
gsub('^S S', 'S', '3421 BIGS St')
you can use logical or inside your pattern too:
gsub('^S S|S S$| S S ', 'S', a)
the " S S " condition is difficult.
gsub('^S S|S S$|
To those without access to nabble, the code in reference is:
relative <- ddply(ranktable, .(Timestamp), function(x)
data.frame(relative = x[,5]/max(x[,5])))
I may be misunderstanding your question, but:
ddply splits your data.frame, ranktable, by the column Timestamp into
many smaller data.fram
What have you tried?
What type of file are you trying to import from?
What do you want your data to look like in R?
take a look at ?read.table and ?readLines
On Wed, Mar 28, 2012 at 11:23 AM, joel.green wrote:
> Hey
>
> I am having trouble importing data into R, my data field looks like this
There may very well be a better solution, but this works.
format(strptime(dayofyear, format="%j"), format="%m-%d")
On Tue, Mar 27, 2012 at 11:12 AM, Sam Albers wrote:
> Hello,
>
> I am having trouble figuring out how to convert a Day of Year integer
> back into a Date format. For example I have
reproducible code request prompted me to discover my
error; thanks all.
-
Justin Montemarano
Graduate Student
Kent State University - Biological Sciences
http://www.montegraphia.com
On Wed, Mar 21, 2012 at 12:42 PM, R. Michael Weylandt <
michael.weyla...@gmail.com> wrote:
> You'l
, panel.grid.minor = theme_blank())
Is there anything odd about it that might be producing the odd ordering
problem? FYI, avoiding subsetting ag.tab doesn't do the trick.
-
Justin Montemarano
Graduate Student
Kent State University - Biological Sciences
http://www.montegraphia.com
On Wed, Mar 21,
27;m sorry if
I wasn't clear and/or I've missed your message.
-
Justin Montemarano
Graduate Student
Kent State University - Biological Sciences
http://www.montegraphia.com
[[alternative HTML version deleted]]
__
R-help@r-project.or
Actually I've try that too, Sarah
The test is to run order(levels(total.density)), which I need to be 1 2 3,
not 2 3 1, and your solution still gives me 2 3 1.
I also don't know how to reply to this thread with the previous message
below...
-
Justin Montemarano
Graduate Student
32,32,32,32,32,32,32,32,32,32,32,32)
I'm running R 2.14.2 with all packages up-to-date as of 21.3.2012.
Any help would be greatly appreciated.
-
Justin Montemarano
Graduate Student
Kent State University - Biological Sciences
http://www.montegraphia.com
[[alternative HTML version dele
Wow... that is WAY better!
Thanks Gabor!
On Wed, Mar 7, 2012 at 8:51 AM, Gabor Grothendieck
wrote:
> On Wed, Mar 7, 2012 at 11:28 AM, Alaios wrote:
>> Dear all,
>> I would like to ask you if R has a library that can work with different GPS
>> formats
>>
>> For example
>> I have a string of thi
Take a look at:
http://cran.r-project.org/web/views/Spatial.html
But I've always just parsed the string...
This is from the last time I did this, its not quite the same but you
can see the similarities.
## if data is presented as 43°02'46.60059" N need to split on the °
symbol, ' and ".
to.deci
?as.numeric
> as.numeric(c(TRUE, FALSE))
[1] 1 0
On Wed, Mar 7, 2012 at 8:02 AM, Ed Siefker wrote:
> I am trying to use the coXpress function from
> the coXpress package. This function requires
> numerical vectors indicating which columns
> are in which group.
>
> The problem is, I can only fi
e trick.
hope that helps,
Justin
On Wed, Mar 7, 2012 at 8:03 AM, Dan Abner wrote:
> Hi everyone,
>
> What is the easiest way to remove the word Average and strip leading
> and trailing blanks from the character vector (d5.Region) below?
>
> .nrow.d5. d5.Regi
; "
STATUS(0=alive, 1=dead): 1"
> lapply(strsplit(x,';'),'[',2)
[[1]]
[1] " Surv(months): 21"
But i would follow David's second suggestion and just read them in with
sep=';' instead.
Justin
On Wed, Feb 29, 2012 at 11:24 AM, F
ue, colour=variable)) + geom_line() +
ylab('Total Chargeoffs')
this is untested since there is no sample data!
Justin
On Thu, Feb 16, 2012 at 2:50 PM, Keith Weintraub wrote:
> Folks,
> I want to automate some graphing using ggplot.
>
> Here is my code
> graph
There is probably a more ellegant way, but:
> df <-
data.frame(p1=c(1,2,1),p2=c(3,3,2),p3=c(2,1,3),p4=c(5,6,4),p5=c(4,4,6),p6=c(6,5,5))
> as.data.frame(t(apply(df,1,function(x) names(x)[match(1:6,x)])))
V1 V2 V3 V4 V5 V6
1 p1 p3 p2 p5 p4 p6
2 p3 p1 p2 p5 p6 p4
3 p1 p2 p3 p4 p6 p5
>
On Mon, Feb
You can add
if(is.na(tab[i])) browser()
or
if(is.na(tab[i])) break
see inline
On Fri, Feb 10, 2012 at 7:22 AM, ikuzar wrote:
> Hi,
>
> I'd like to debug in a loop (using debug() and browser() etc but not
> print()
> ). I'am looking for the first occurence of NA.
> For instance:
>
> tab = c(1
Howdy,
This should be simple, but I am finding that I can't find a simple
solution. I have a plot to which I am manually adding the annotations
to the y-axis with this command:
axis(2,
c(-4,-3,-2,-1,0,1,2,3,4,5,6,7),labels=c(-4,-3,-2,-1,0,1,2,3,4,5,6,7),cex.axis=8)
The issue is that, apparen
32 bit windows has a memory limit of 2GB. Upgrading to a computer thats
less than 10 years old is the best path.
But short of that, if you're just generating random data, why not do it in
two or more pieces and combine them later?
mat.1 <- matrix(rnorm(5*2000),nrow=5)
mat.2 <- matrix(rno
Instead of a for loop, why not use the vectorization inherent in R?
sigmasqaured <- 1
i <- complex(real = 0, imaginary =1)
f <- seq(0,0.5,0.1)
spectrum
<-
(sigmasqaured)/(abs(1-2.7607*exp(2*pi*i*f)+3.8106*exp(4*pi*i*f)-2.6535*exp(6*pi*i*f)+0.9258*exp(8*pi*i*f))^2)
> spectrum
[1] 9.632720e+00 1.4
How bout:
apply(Data..,1, function(vec) !all(vec==vec[1]))
[1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE TRUE
On Mon, Feb 6, 2012 at 10:34 AM, LCOG1 wrote:
> Hi all
> For the data below, I would like to return a logical value indicating
> differences in the data.
>
> #Create da
log(0) which is an error. Thus, I
need to stay in the log scale, since, for z less than 10 sd below the mean,
log(pnorm(z)) is an error, and
pnorm(z,log.p=TRUE) is stable even though theoretically they are equivalent.
Thanks for your time
Justin
[[alternative HTML
sible to add a
marginal column ?
Sincerly
Justin BEM
BP 1917 Yaoundé
Tél (237) 76043774
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting gu
> dataset<-data.frame(a=1:10,b=c(0,0,0,1,0,0,0,0,1,0),c=rep(0,10))
> apply(dataset,2,function(x) all(x==0))
a b c
FALSE FALSE TRUE
> dataset[,!apply(dataset,2,function(x) all(x==0))]
a b
1 1 0
2 2 0
3 3 0
4 4 1
5 5 0
6 6 0
7 7 0
8 8 0
9 9 1
10 10 0
On Tue, Ja
)
> grepl('\\[[9-z]+\\]',x)
[1] FALSE TRUE FALSE FALSE FALSE TRUE
> x[grepl('\\[[9-z]+\\]',x)]
[1] "[bracket]" "[bar]"
You might need a more complex reg-ex to catch them all incase of
([citation]) instances for example.
Justin
On Tue, Jan 24, 2012 at 6:52
?str tells you about the object.
str(MAX3(a,'asy',1))
from that you can see the names of the various parts including p.value.
foo <- MAX3(a,'asy',1)$p.value
On Mon, Jan 23, 2012 at 9:32 AM, Tiago V. Pereira
wrote:
> Dear all,
>
> Supposed I run the following command:
>
>
to use ggplot:
dat<-data.frame(num=1:3,usage=c(4,2,5),cap=c(10,20,10),diff=c(6,18,5))
dat.melt<-melt(dat,id.var=c('num','cap'))
ggplot(dat.melt)+geom_bar(aes(x=num,y=value,fill=variable),stat='identity')
On Fri, Jan 20, 2012 at 12:30 PM, Jean V Adams wrote:
> Bart6114 wrote on 01/20/2012 08:
sorry for the confusion. however, in the future please provide a
reproducible data set along with your question so we can more easily help.
Justin
On Fri, Jan 20, 2012 at 5:49 AM, Geophagus
wrote:
> Dear Petr and Justin,
> my problem ist, that I only want to have the 4 highest values
how bout
levels(df$z)[grep('A',levels(df$z))] <- 'A'
levels(df$z)[grep('B',levels(df$z))] <- 'B'
levels(df$z)[grep('C',levels(df$z))] <- 'C'
does that do what you're wanting?
On Thu, Jan 19, 2012 at 3:05 PM, Sam Albers wrote:
> Hello all,
>
> This is one of those "Is there a better way to do t
experience with CairoPNG and making it look like the base png
function, id love to hear what you've learned!
Thanks,
Justin
> capabilities()
jpeg png tifftcltk X11 aqua http/ftp sockets
libxml fifo clediticonv NLS profmem
FALSEFALSE
how bout:
dat<-data.frame(val=rnorm(100,12,10),x=letters[1:4])
col.val<-ddply(dat,.(x),summarise,mean(val))
col.val$breaks<-cut(col.val$..1,c(0,9,15,Inf))
dat.merge<-merge(dat,col.val)
ggplot(dat.merge,aes(x=x,y=val,colour=breaks))+geom_boxplot()+scale_color_manual(values=c('green','yellow','red')
disregard the legends of the
> following fig.
>
>
> http://had.co.nz/ggplot2/graphics/55078149a733dd1a0b42a57faf847036.png
>
> http://had.co.nz/ggplot2/graphics/90983232ced45a93d9fbbe40afffd69a.png
>
> Thanks
>
> On Thu, Jan 12, 2012 at 12:13 PM, Justin Haynes wrote:
On Thu 12 Jan 2012 09:02:27 AM PST, Mary Kindall wrote:
Hi
I have a data frame in the following form. There are two groups and for
each 'width' relative frequency for group1 and group2 is given. How to plot
this in R using ggplot or other package.
Width relativeFrequency1 relativeFreq
ks! -- H
Check out the splancs package. particularly the inout function.
Justin
__
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
and provide
woops! see inline.
Hope that helps, and enjoy R.
Justin
On Tue, Jan 10, 2012 at 8:40 AM, Geophagus
wrote:
> Hi Justin,
> thanks a lot for your quick answer.
> If I use your code, all points become red.
> How do you include the sorted and separated four values into the "p
=TOC_NI,col='red',pch=1,size=3)
Justin
On Tue, Jan 10, 2012 at 7:11 AM, Geophagus
wrote:
> Hi @ all,
> I have question how to mark significant outliers in R.
> This is my very simple script to plot a regression:
>
> TOC_NI<-read.csv2("C:/Users/XYZ/De
If instead you want to plot
something like:
ggplot(dat,aes(x=likeability,y=uniqueness,colour=city))+geom_point()+geom_smooth(aes(group=city),method='lm')
You could draw fit lines that make a bit more sense. Forgive me if I'm
over simplifying your problem!
Justin
On Thu, Jan 5,
rtant.
hope that helps,
Justin
On Thu, Jan 5, 2012 at 5:51 AM, Thijs vanden Bergh <
bergh.thijsvan...@gmail.com> wrote:
> was trying to match different matrices of different lengths with in
> the first collumn date and time info (yearmonthdayhourminute). the
> routine needs to re
homework or not,
?rbinom
should be plenty.
On Wed, Jan 4, 2012 at 1:38 PM, lynn.tsai wrote:
> Hello, I have the following code using rbinom, but I don't understand what
> *"+1"* means in the code. Could someone help? Thanks so much,
>
> > X1<-c("A","B")[rbinom(n,1,0.6)+1]
> > X2<-c("C","D")
apply(expand.grid(x, y, z, stringsAsFactors=F), 1, paste, collapse=' ')
On Wed, Jan 4, 2012 at 8:32 AM, jeremy wrote:
> Hi all,
>
> I'm trying to combine exhaustively several character arrays in R like:
> x=c("one","two","three")
> y=c("yellow","blue","green")
> z=c("apple","cheese")
>
> in or
do s[1] and s[-1] do what you're looking for?
those are just to display... if you want to change s, you need to reassign
it or fiddle with namespacing. however, I'd say it is better to write R
code as though data structures are immutable until you explicitly re-assign
them rather than trying to de
there is also colwise in the plyr package.
> library(plyr)
> colwise(class)(data6)
v13 v14 v15 f4 v16
1 integer numeric character factor logical
Justin
On Thu, Dec 29, 2011 at 4:47 PM, Jean V Adams wrote:
> Dan Abner wrote on 12/29/2011 06:13:11 PM:
>
>
u need to enumerate the set
> of good strings. That is tedium, not danger.
>
> If t1d_ptype might take any value, then make it a character vector.
>
> Bill Dunlap
> Spotfire, TIBCO Software
> wdunlap tibco.com
>
> > -Original Message-
> > From: r-
and one final note, you should avoid naming things with pre-existing R
functions (e.g. data).
Justin
On Tue, Dec 20, 2011 at 11:14 AM, 1Rnwb wrote:
> hello gurus,
>
> i have a data frame like this
> HTN HTN_FDR Dyslipidemia CAD t1d_ptype[1:25]
> 1Y
correctly as well as save correctly.
If that doesn't answer your question, some more back story on what you're
trying to do would help.
Justin
On Tue, Dec 13, 2011 at 2:03 PM, bonnieyuan wrote:
> I'm doing a text mining project where I have to manually enter a double
&
more info about your data (see ?str and ?dput) or if you
can generate made up data that replicates your problem that works too.
Justin
On Wed, Dec 7, 2011 at 9:16 AM, bevare wrote:
> Hi,
>
> Can anyone help sort out the problem with the following script - I am a R
> newbie and I am s
mething other than the URL"?
>
> I feel the tikzDevice package should be an option for the task.
>
> Regards,
> Yihui
> --
> Yihui Xie
> Phone: 515-294-2465 Web: http://yihui.name
> Department of Statistics, Iowa State University
> 2215 Snedecor Hall, Ames, IA
&
Howdy,
I have read that if you put a URL in the text of a plot being saved
into pdf, the result is a functional hyperlink. I am interested in
having text in a plot that is linked to a URL, but I would like the
text to be something other than the URL. Is this possible? Thank you.
- Fincher
able and plyr perform the na.rm on each column.
Justin
On Tue, Nov 29, 2011 at 12:21 PM, Juliet Hannah wrote:
> I am calculating the mean of each column grouped by the variable 'id'.
> I do this using aggregate, data.table, and plyr. My aggregate results
> do not match the othe
s()
or +geom_line() if you'd rather.
Hope that helps,
Justin
On Tue, Nov 29, 2011 at 10:07 AM, threshold wrote:
>
> Dear R useres, got the following problem. Given the AggData (listed below)
> I need to plot AggData[,2] vs time (AggData[,1]) for chosen 'rows'. Ive
>
520 43.061
> system.time(print(qplot(x,y,pch=I('.'
user system elapsed
32.370 0.204 33.868
On Fri, Nov 18, 2011 at 12:39 PM, Hadley Wickham wrote:
> You need: system.time(print(qplot(x,y,pch=I('.'))))
>
> Hadley
>
> On Fri, Nov 18, 2011 at 1:
Very cool. Sadly, as far as I can tell, it doesn't work with ggplot though
:(
> x<-runif(1e6)
> y<-runif(1e6)
> system.time(plot(x,y,pch='.'))
user system elapsed
0.824 0.012 0.845
> system.time(plot(x,y))
user system elapsed
33.422 0.016 33.545
> system.time(print(qplot(x,y)))
13
[2,]24
> apply(x,c(1,2),sum)
[,1] [,2]
[1,]4 12
[2,]8 16
a margin of c(1,2) makes more sense. Hope that clarifies things.
Justin
On Wed, Nov 16, 2011 at 12:18 PM, Sarah Goslee wrote:
> Hi,
>
> On Wed, Nov 16, 2011 at 3:13 PM, wrote:
>>
>&
take a look at the structure of what Sys.time returns.
str(Sys.time)
and now at ?strptime!
> format(Sys.time(),format='%d-%H-%M-%S')
[1] "15-09-55-55"
> format(Sys.time(),format='%Y')
[1] "2011"
> format(Sys.time(),format='%m')
[1] &
?expand.grid
> expand.grid(c("M","F"),c("Y","O"))
Var1 Var2
1M Y
2 FY
3MO
4FO
>
Justin
On Thu, Nov 3, 2011 at 10:56 AM, Bond, Stephen wrote:
> Greetings useRs,
>
> What is the easiest way to create a
x27;t seem to
affect my output as far as I can tell.
Thanks!
Justin
> sessionInfo()
R version 2.13.2 (2011-09-30)
Platform: x86_64-pc-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=C LC_
first of all, the subsetting line is overly complicated.
dat.sub<-dat[dat$treat!='cont',]
will work just fine. R does exactly what you're describing. It knows
the levels of the factor. Once you remove 'cont' from the data, that
doesn't mean that the level is removed from the factor:
> df<-dat
1 - 100 of 231 matches
Mail list logo