It certainly does. As we are often confronted with requests for
solutions of problems so minimally defined as to challenge the most
eminent mindreader, this excels. We have a meta-problem as the
supplicant him- (or her-, I cannot even ascertain this) does not
appear to know what it is. Thus me are
No, I'm quite certain that the answer is:
7*6 = 3*2^4 - 36/6
but I don't know the question
Jim
On Fri, Oct 7, 2016 at 9:48 AM, Dalthorp, Daniel wrote:
> Question and answer:
>
> 6*9 = (4)*13^1 + (2)*13^0
>
> On Thu, Oct 6, 2016 at 3:26 PM, Jim Lemon wrote:
>>
Hi Heather,
I think the problem may be that you are trying to compare a date field
and a character string. R helpfully tries to wrangle the two into
comparable data types. While I don't know exactly what you have done,
as R for:
as.numeric(alldata$new.date.local)
and look at the value you get.
J
Hi Margaret,
This may be a misunderstanding of your request, but what about:
mydata<-data.frame(oldvar=paste("topic",sample(1:9,20,TRUE),sep=""))
mydata$newvar<-sapply(mydata$oldvar,gsub,"topic.","parenttopic")
Jim
On Tue, Oct 11, 2016 at 1:56 AM, MACDOUGALL Margaret
wrote:
> Hello
>
> The R c
Hi Marna,
Isn't the conventional way to visualize depth as shades of blue?
library(plotrix)
depth.col<-color.scale(dat1$depth,extremes=c("lightblue",blue"))
Then color the lon/lat rectangles with depth.col
Jim
On Wed, Oct 12, 2016 at 7:49 PM, Marna Wagley wrote:
> Hi R Users,
> Is it possibl
Hi Adrian,
Perhaps what you want is this:
ajdat<-structure(c(112L, 0L, 579L, 1L, 131L, 1L, 2234L, 2L, 2892L, 1L,
528L, 0L, 582L, 2L), .Dim = c(2L, 7L), .Dimnames = list(c("GN",
"CN"), c("DC5", "DC8", "DC14", "DC18", "DC19", "DC20", "DC23"
)))
library(plotrix)
twoord.plot(0.8:6.8,ajdat[2,],1.2:7.2,
The crucial thing is probably:
"... they are translated to UTF-8 before comparison."
Although the first 127 characters seem to be identical to ASCII, in
which punctuation marks sorted before digits or letters, the encoding
to UTF-8 may make that impractical.
Jim
On Thu, Oct 13, 2016 at 8:55 PM
Hi Hugo,
If you look at the help page for "distributions", you will see that it
describes a number of functions that return density functions, etc.
for specific distributions. If you are looking for something that
informs you which distribution might approximate an existing set of
values, try the "
Hi Andreas,
Try this:
fruit_2sds<-by(data2$molecule,data2$fruit,sd)*2
data2$newcol<-ifelse(data2$molecule>fruit_2sds[data2$fruit],1,0)
or even just:
data$newcol<-as.numeric(data2$molecule>fruit_2sds[data2$fruit])
Jim
On Fri, Oct 14, 2016 at 5:17 PM, Andreas Nord wrote:
>
> Dear list,
>
> Apo
Hi T,
Have you tried converting "clearntest" or "data" into a time series?
Jim
On Sat, Oct 15, 2016 at 4:47 AM, T.Riedle wrote:
> Dear all,
>
> I am trying to clean return data using the Return.clean() function in the
> PerformanceAnalytics package. Hence, my code looks as follows but I get an
Hi Anze,
I'm not sure that this will work on Windows, but you can create a
function named ".First" (note the leading period) with something like
this:
.First<-function() setwd("C:/Users/anze")
To do this, start a session, enter the above line and then quit the
session, saving the current workspac
Hi mviljama,
Without knowing what "dta" contains, it's a bit difficult. Here is an example:
set.seed(2345)
dta<-data.frame(age=sample(20:80,50),skin=sample(0:1,50,TRUE),
gender=sample(0:1,50,TRUE),trt=sample(0:1,50,TRUE),
exposure=sample(1:21,50,TRUE),fit5=runif(50))
# define your subset here fo
Hi again,
Sorry, the text command should read:
text(x=dta$age[samp010],y=dta$fit5[samp010],labels=dta$exposure[samp010],
col=expcol[samp010])
Jim
On Fri, Oct 21, 2016 at 8:50 AM, Jim Lemon wrote:
> Hi mviljama,
> Without knowing what "dta" contains, it's a bit difficul
Hi Andrea,
Assuming that your model is something like:
lm(y~x,data=mydata)
See what:
cor(mydata$y,mydata$x)
returns. If it is very very close to 1 or -1, there lies your problem.
If one or more of your predictor variables is an almost perfect
predictor of the response, you don't have much room
Hi Julia,
The error you got is usually due to data that should be numeric (1, 2,
3, ...) actually being a factor data type. This often happens when R
reads in a CSV file with the default option of converting character
variables (A, B, C,...) to factors. So your first column after input
may be a fac
Hi Alily,
Your image file didn't get through to the list. Try sending a PDF
image or perhaps providing a URL for an image stored on the internet.
Jim
On Wed, Oct 26, 2016 at 8:46 PM, Indhira, Anusha
wrote:
> Hi,
>
> I am trying to understand graph generated by plot.svm command. when I use
> mod
Hi Elham,
As you have asked this question a large number of times in quite a few
places, and have received reasonable answers, I assume that you
already know that the gene names and associated values are in another
format. What you probably want to do is to convert the first column of
the data that
Hi Lucas,
This is a rough outline of something I programmed years ago for data
cleaning (that was programmed in C). The basic idea is to read the
file line by line and check for a problem (in the initial application
this was a discrepancy between two lines that were supposed to be
identical). Here,
hi James,
I think you have to have a starting date ("origin") for as.Date to
convert numbers to dates.
Jim
On Sun, Nov 6, 2016 at 12:10 PM, James Hirschorn
wrote:
> This seemed odd so I wanted to check:
>
> > x <- foreach(i=1:10100, .combine='c') %do% { as.Date(i) }
>
> yields a numeric vec
Hi Joshua,
Use Notepad++. It will also convert the linefeed EOLs to CR/LF.
Jim
On Mon, Nov 7, 2016 at 4:25 AM, Joshua Banta wrote:
> Dear everyone,
>
> Please consider the following code, which I am using to make a custom text
> file. (I need to build the text file line-by-line like this for so
Hi lily,
My first guess is that the errors are due to trying to open a file like:
"fold1/file1.txt"
as:
"file1.txt"
That is, your code will generate filenames in the directories
fold1,..., without prepending the folder names. Maybe:
result_list<-list()
read_dirs<-paste("fold",1:3,sep="")
rn<-1
Hi Henry,
You are certainly starting from the beginning. first, when you import
the data from a CSV file, remember to add:
read.csv(...,stringsAsFactors=TRUE)
There will doubtless be other problems, but you have to start somewhere.
Jim
__
R-help@r-pro
Geez, I must be too excited. I meant:
stringsAsFactors=FALSE
Jim
On Wed, Nov 9, 2016 at 7:44 PM, Jim Lemon wrote:
> Hi Henry,
> You are certainly starting from the beginning. first, when you import
> the data from a CSV file, remember to add:
>
> read.csv(...,stringsAsFactors=
Hi Milu,
Perhaps this will help:
apply(as.matrix(x[-1,seq(1:dim(x)[1],by=4)]),1,mean)
Jim
On Thu, Nov 10, 2016 at 4:00 AM, Miluji Sb wrote:
> Thanks a lot for your quick reply. I made a mistake in the question, I
> meant to ask every 4 (or 12) rows not columns. Apologies. Thanks again!
>
> Sin
Thanks - it made me realize that I had reversed the column and row selection
rowMeans(x[seq(1:dim(x)[1],by=4),-1])
Jim
On Thu, Nov 10, 2016 at 8:30 AM, Uwe Ligges
wrote:
>
>
> On 09.11.2016 22:06, Jim Lemon wrote:
>>
>> Hi Milu,
>> Perhaps this will help:
>>
Hi Miluj,
Perhaps you didn't get my previous email. Let your data frame be named "msdf":
block_col_summ<-function(x,step,block_size,FUN="mean") {
dimx<-dim(x)
return_value<-NA
start<-1
end<-start+block_size-1
block_count<-1
while(end <= dimx[2]) {
return_value[block_count]<-
do.call(FUN
Hi john,
I don't know whether this breaks any rules, but:
target_pair<-c(3,4)
pair_list<-list(c(1,2),c(3,4),c(5,6))
sapply(pair_list,identical,target_pair)
[1] FALSE TRUE FALSE
Jim
On Sun, Nov 13, 2016 at 1:32 PM, Jeff Newmiller
wrote:
> Sorry, that was a fail. Better to think about:
>
> any(
Hi Salvatore,
If by "size" you mean volume, why not directly measure the volume of
your animals? They appear to be fairly small. Sometimes working out
what the critical value actually means can inform the way to measure
it.
Jim
On Sun, Nov 13, 2016 at 4:46 PM, Sidoti, Salvatore A.
wrote:
> Let'
; Then divide by the sum of the weights:
> 0.43758 / 1.697 = 0.257855 = "animal size"
>
> This value can then be used to rank the animal according to its size for
> further analysis...
>
> Does this sound like a reasonable application of my PCA data?
>
> Salvatore A
Hi Bernardo,
I don't think that your function is doing anything like you expect it to do:
test <- data.frame(var1=c("a","b","c"),var2=c("d","e","f"))
test
var1 var2
1ad
2be
3cf
You have a data frame with two columns, the first thing you do is
extract the first value in th
Hi mokuram,
As others have noted, you will profit from a bit more knowledge about
"extraction":
sum(mtcars)
[1] 13942.2
This works because you have "extracted" the first column of the
"mtcars" data frame _as a data frame_
mtcars[1]
mpg
Mazda RX4 21.0
Mazda RX4 Wag
Hi Venky,
Unfortunately the MindReader package produces the following:
1. I want ice cream Desire
2. I like banana very much Pleasure
3. Tomorrow i will eat chicken Expectation
4. Yesterday i went to bi
Hi Farnoosh,
Try this:
for(id in unique(df$Subject)) {
whichsub<-df$Subject==id
if(exists("newdf"))
newdf<-rbind(newdf,df[whichsub,][which(!duplicated(df$dates[whichsub])),])
else newdf<-df[whichsub,][which(!duplicated(df$dates[whichsub])),]
}
Jim
On Tue, Nov 15, 2016 at 9:38 AM, Farnoosh
Hi Ramnik,
Bert's answer is correct, and an easy way to see why is to look at:
c(1,F,"b")
[1] "1" "FALSE" "b"
The reason that "F" is translated to "FALSE" is that is its default
value when R is started. If you change that value:
F<-"foo"
c(1,F,"b")
[1] "1" "foo" "b"
as.logical(c(1,F,"b"))
Hi Olu,
If you always have only one non-NA value in the first three columns:
veg_df<-data.frame(col1=c(NA,"cassava","yam",NA,NA,NA,"maize"),
col2=c("pumpkin",NA,NA,"cherry",NA,NA,NA),
col3=c(NA,NA,NA,NA,"pepper","mango",NA))
veg_df$col4<-apply(as.matrix(veg_df),1,function(x) x[!is.na(x)])
Jim
`Hi Stuti,
Your problem is that if you want to have more than one command on a
single line, you must separate them with a semicolon.
j <- function() {
if(!exists ("a")){
a <- 1
} else{
a <- a+1
}; print(a)}
The above will work, but is usually considered bad form. What follows
is usually easie
Hi Erin,
I would look at:
par("usr")
to see what the range of the abscissa might be.
Jim
On Fri, Nov 25, 2016 at 2:03 PM, Erin Hodgess wrote:
> Hello! Happy Thanksgiving to those who are celebrating.
>
> I have a zoo series that I am plotting, and I would like to have some
> vertical lines a
Hi lily,
If you want to use aggregate, supply the name of the function:
aggregate(flow~year, data=df, "sum")
You can also use "by" like this
by(df$flow,df$year,FUN=sum)
I assume that you don't have to worry about missing months in a year.
Jim
:
On Thu, Dec 1, 2016 at 3:06 PM, lily li wrote:
On Fri, Dec 2, 2016 at 7:58 AM, Ismail SEZEN wrote:
>
> So, it’s more reasonable to identify the gender manually.
>
Both Paul ("Crocodile Dundee") Hogan and Donald Trump agree on that.
Jim
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more
Hi Elysa,
I think you are going a bit off course in your example. Try this and
see if it is close to what you want:
data<-rnorm(100)+runif(100,0,15)
smu_data<-supsmu(1:100,data)
rollfun<-function(x,window=10,FUN=sd) {
xlen<-length(x)
xout<-NA
forward<-window%/%2
backward<-window-forward
for(i
into my density plot (and not a confidence line along a scatter
> plot like your suggested solution)
>
> My x-axis is an index (a data frame), my y-axis is the automatically
> constructed density
>
> On Fri, Dec 2, 2016 at 10:01 AM, Jim Lemon wrote:
>>
>> Hi Elysa,
>>
Hang on, maybe you mean something like this:
erupt_dens<-density(faithful$eruptions)
plot(erupt_dens,ylim=c(0,0.65))
dispersion(erupt_dens$x,erupt_dens$y,ulim=erupt_dens$y/5,
type="l",fill="lightgray",interval=TRUE)
lines(erupt_dens)
Jim
On Fri, Dec 2, 2016 at 9:36 PM,
Hi Maria,
Perhaps something like this:
mldf<-read.table(text="Sample Cu Zn Mn
M1 1 5 10
M2 2.5 11 8
M3 1.15 11 12
M4 2 4 30
M5 8 15 35",
header=TRUE)
matplot(mldf,type="b",pch=c("C","Z","M"))
Jim
On Mon, Dec 5, 2016 at 11:25 PM, Maria Lathouri via R-help
wrote:
> Dear al
Hi Dagmar,
I think you want something like a gantt.chart. I know this is wrong in
some ways, but it is late and I must retire:
datframe <- data.frame(Name=c("Kati","Kati","Kati","Leon","Leon","Leon"),
changepoint=as.Date(c("03.01.2011","05.01.2011", "27.01.2011",
"26.01.2011","28.01.2011", "28.
Hi Paul,
The easy to understand way is:
n <- c(1:10)
# Create empty list to store vectors
list_of_vecs <- list()
# Create n vectors of random numbers - length 10. This works ok.
for (i in n){
list_of_vecs[[i]]<-rnorm(10,0,1)
}
If you really want to use "assign":
for (i in n){
vecname<-paste('v
Hi Greg,
What is happening is easy to see:
ph<-matrix(sample(1:100,40),ncol=4)
colnames(ph)<-c("M1","X1","X2","X3")
ph[sample(1:10,3),1]<-NA
ph
M1 X1 X2 X3
[1,] 34 98 3 35
[2,] 13 66 74 68
[3,] NA 22 99 79
[4,] 94 6 80 36
[5,] 18 9 16 65
[6,] NA 29 56 90
[7,] 41 23 7 5
;01.01.2011","%d.%m.%Y")),
datframe$changepoint[1:2],
as.POSIXct(strptime("24.01.2011","%d.%m.%Y")),
datframe$changepoint[4:5]),
ends=datframe$changepoint)
gantt.chart(tm.info,
xlim=as.POSIXct(strptime(c("1.1.2011","10.3.2011"),"%d.%
Hi Marna,
If we assume a sample size of 1, something like this:
dat[sample(which(dat$group!="C"),ceiling(14*0.4),TRUE),]
dat[sample(which(dat$group=="C"),floor(14*0.6),TRUE),]
Then just step through the two subsets to access your samples.
One problem is that you will not get exactly 40 or 60 %,
Hi Grace,
It is almost certainly a directory problem. The new R installation may
be in a different directory from the old one. Does R run from the
Start menu or a desktop icon? If so, look at "Properties" to discover
where it is located and use the explicit path (e.g. C:\Users\Grace\R
-save < IPFPU
Hi Jatin,
It looks as though the third plot has the contour plot beneath the
map, which is opaque.If you just want to show the three "hotspots" on
the map, perhaps you could adjust the colors so that they are
displayed on a transparent field instead of blue and then overlay that
on the map.
Jim
Sample without replacement and then split that sample into train and
test components.
Jim
On Fri, Dec 9, 2016 at 4:55 PM, Partha Sinha wrote:
> How to get two sets of non overlapping data?
> Regards
> Parth
__
R-help@r-project.org mailing list -- To U
Hi Francesca,
I'm not sure what you are doing here, but try this:
regnames<-paste("r",letters[1:8],sep="")
for(i in 1:8) {
response<-rnorm(20)
coef1<-rnorm(20)
coef2<-rnorm(20)
age<-sample(20:50,20)
gender<-sample(c("M","F"),20,TRUE)
assign(regnames[i],lm(response~coef1+coef2+age+gender))
}
Hi Tan Dai,
It looks like you have little or no variance in your measurements, and
so the result is degenerate. The functions you are using are probably
working properly, but there is nothing to display.
Jim
On Sat, Dec 10, 2016 at 6:04 PM, Tan Dai Chuan via R-help
wrote:
> Hi, i face the probl
Hi Milu,
I may have the wrong idea, but is this what you want?
temp$ID<-paste(temp$iso3,temp$lon,temp$lat,sep="")
library(prettyR)
newtemp<-stretch_df(temp,"month","precip")[,c(5,7,8)]
names(newtemp)<-c("month",unique(temp$ID))
Jim
On Tue, Dec 13, 2016 at 4:10 AM, Miluji Sb wrote:
> Dear all,
Hi Pijush,
Don't worry about the "arrangement" of the functions in the help file.
They are ordered alphabetically and this has nothing to do with the
order in which they are actually used. The more serious problem is
probably your help files. There should be a "man" (help) file for each
function, u
Hi Marna,
Your request made me think that a simple manual label placing function
might be useful to some people.
placeLabels<-function(pointer=TRUE,cex=1,labelcol=par("fg"),
bg="white",border=par("fg"),pointercol=par("fg")) {
cat("Enter a blank label to finish\n")
nextlabel<-"XXX"
while(nchar
Hi Bailey,
I may be misunderstanding what you are doing as I can't work out how
you get unequal column lengths, but this may help:
myval<-matrix(sample(1:365,740,TRUE),ncol=74)
mydata<-as.data.frame(cbind(1950:1959,myval))
lakenames<-paste(rep(LETTERS[1:26],length.out=74),
rev(rep(letters[1:25],l
Hi Marna,
After a bit of experimenting I came up with the following function
that "flags" each point to be labeled an allows the operator to
manually place the label for that point:
placeLabels<-function(x,y,labels,pointer=TRUE,cex=1,labelcol=par("fg"),
labelbg="white",border=par("fg"),pointercol
Hi Bryan,
When I have to do something like this, I usually go through HTML
output and import it into MS Word. I am not suggesting that this is
the best thing to do, but it might get you out of trouble. I'm not
sure whether importing HTML into Excel will work as well. I assume
that you are running a
;
> I found this code, but it doesn’t cover the whole output of the console.
>
> write.csv(coef(summary(test)), file=“test.csv”)
>
> My whole output consists of descriptives and regressions.
>
> Best,
>
> Bryan Mac
> bryanmac...@gmail.com
>
>
>
>> O
Hi Robert,
I realize that this isn't in ggplot, but are you looking for something
like this?
Demog <-
data.frame(source=c(rep("Davis",4),rep("Dixon",4),rep("Winters",4)),
group =c("Asian / Pacific Islander","Caucasian","Latinx",
"Not Latinx","African American", "Native American", "Latinx",
"Not
Hi Dan,
This may help if your data is in the format below:
waffle.mat<-matrix(c(rep(NA,14),137,135,rep(NA,6),144,149,
rep(NA,3),150,152,159,157,154,
NA,163,164,164,161,162,165,164,rep(NA,5),179,173,173,
rep(NA,4),182,180,185,180,
rep(NA,6),197,190,rep(NA,8)),ncol=9)
waffle.col<-matrix("lightbl
egdat[as.numeric(egcut)==egindex])
egdf<-as.data.frame(lapply(eglist,function(x) x[1:8]))
names(egdf)<-paste("V",1:9,sep="")
waffle.mat<-as.matrix(sapply(egdf,rev))
Jim
On Fri, Jan 6, 2017 at 9:21 AM, Rolf Turner wrote:
> On 06/01/17 10:31, Jim Lemon wrote:
>&g
Hi lily,
maybe this is what you want:
strings1<-c(1.2,1.31,1.4,1.51)
strings2<-c(2.1,2.22,2.3,2.44)
paste(formatC(strings1,digits=2,format="f"),
formatC(strings2,digits=2,format="f"),sep="-")
Jim
On Fri, Jan 6, 2017 at 4:56 PM, lily li wrote:
> Sorry for the emails. I just checked and the pro
Hi Malvika,
What David means is that we don't do people's homework for them. Have
a look at "An Introduction to R" that comes with the R distribution,
particularly about sequences and vectorization.
Jim
On Fri, Jan 6, 2017 at 7:40 AM, Malvika Marathe wrote:
> Can you please help me with this as
Hi Anthony,
I think you have included most of the forbidden characters in Windows
folder names and while I am too lazy to count the characters, you may
have exceeded the 259 character limit as well. Are there really
embedded EOLs as well? This is truly a masterpiece of computer
disobedience.
Jim
Hi Lakshya,
One good way to contribute is to try to do something in R, and if you
see a way to do it better or more easily, you may have an improvement
that will find its way into R. This usually involves a lot of
discovering that someone else has already done it, but as your
knowledge of R expands
Hi Tom,
>From a quick scan of the docs, I think you are looking for qobj$pi0.
The vector qobj$qvalue seems to be the local false discovery rate for
each of your randomizations. Note that the manual implies that the p
values are those of multiple comparisons within a data set, not
randomizations of
Hi Robert,
There is a policy of not doing people's homework for them on the list.
Nevertheless, I would advise you to read up on how to use the
comparison operator (==). Good luck.
Jim
On Tue, Jan 17, 2017 at 7:10 AM, Robert Piliero
wrote:
> Hello,
>
> I am working on a Coursera assignment and
Hi all,
A few days ago I offered a suggestion on how to display the initial
values that were cut into a factor as a waffle plot. As Rolf Turner
noted, a major problem for users would be constructing the matrix that
was fed to the color2D.matplot function. Here is a fairly general
purpose function f
Hi Jake,
As I don't have your data set, try this:
attach(mtcars)
plot(mpg~disp,xaxs="i",yaxs="i")
abline(lm(mpg~disp))
Jim
On Wed, Jan 18, 2017 at 12:04 PM, Jake William Andrae
wrote:
> Hi Everyone,
>
>
>
> I've constructed a script that adds multiple plots to the plot window, but
> I'm having
regression line you display.
Jim
On Wed, Jan 18, 2017 at 1:41 PM, Jake William Andrae
wrote:
> Hi Jim, that works but this is what it then looks like.
>
> -Original Message-
> From: Jim Lemon [mailto:drjimle...@gmail.com]
> Sent: Wednesday, 18 January 2017 1:06 PM
> To: J
s = "i", xlim =
> c(0, 700), ylim = c(0,30), xlab = "Total precipitation (mm)", ylab = "CPI",
> pch=21, bg='black',
> rect(par("usr")[1],par("usr")[3],par("usr")[2],par("usr")[4],col = "white"))
>
things out, as there is a lot left to discover, I would like to
be sure that more than one person sees a use for it.
Jim
On Wed, Jan 18, 2017 at 5:37 PM, Rolf Turner wrote:
> On 18/01/17 12:21, Jim Lemon wrote:
>>
>> Hi all,
>> A few days ago I offered a suggestion on how t
Hi Ed,
It's little hard to work out exactly what you want, but here's a guess:
esdf<-data.frame(GENO=rep(c("control","A","B","AB"),each=20),
age=rep(c(10,20),40),OBS=runif(80,1,21))
for(age in c(10,20)) {
for(geno in c("A","B","AB"))
print(t.test(OBS~GENO,esdf[esdf$age==age &
esdf$GENO %in%
Hi Glenn,
I would try the "rename" option which should allow you to give the
output another name.
Jim
On Sat, Jan 21, 2017 at 2:09 AM, Glenn Schultz wrote:
> All,
> I have a zip that was downloaded with HTTR. I had to use HTTR because I
> need to login and post to the website. The files down
Hi Elise,.
I would ask:
class(data$DateTime)
and see if it returns:
"POSIXct" "POSIXt"
Jim
On Sat, Jan 21, 2017 at 3:02 AM, Elise LIKILIKI
wrote:
> Hello,
>
> I have a dataset containing Date Time, Air Temperature, PPFD, Sol
> Temperature...
> The first data are false so I would like to extr
the data before 2017-01-10 11:00:00 nor columns : Records and
> Ptemp.
> I've tried with subset() and with [ ] but I still have some rows containing
> data before 2017-01-10 11:00:00.
>
> I'm french so I am really sorry about my english
>
> 2017-01-21 11:41 GMT+01:00 Jim
much, it works with your method !! I'm going to be able to
>> process my data, thanks again !
>>
>> Regards,
>>
>> Elise
>>
>> 2017-01-21 23:32 GMT+01:00 Jim Lemon :
>>>
>>> Hi Elise,
>>> If I create a CSV file like your example
Hi Abhinaba,
I'm sure that someone will post a terrifyingly elegant regular
expression that does this, but:
ardat<-
c([1] " 1 X[0,SMITH] * 0 0 1 ",
...
numpoststar<-function(x) {
xsplit<-unlist(strsplit(x,""))
starpos<-which(xsplit=="*")
# watch out
Hi Richard,
I think there may be something amiss in the plot.table function. As
you note, changing the class of fr to array produces a more sensible
plot, as does Bert's "as.vector". Yet inside plot.table we find:
plot(x0, unclass(x), ...
and that should produce an array:
class(unclass(fr))
[1]
Hi Elham,
Without knowing much about what coding.rpkm and ncoding.rkpm look
like, it is difficult to say. Have you tried to subset these matrices
as you do in the "cor" function and see what is returned?
Jim
On Tue, Jan 31, 2017 at 6:40 AM, Elham - via R-help
wrote:
> for calculating correlation
Hi Kwesi,
Even without the data, it seems clear that you want something like a
rolling mean. Here is a simple function that will apply a function
like "mean" to successive bits of a vector of numbers:
collapse_values<-function(x,span,FUN="mean",na.rm=FALSE) {
jump<-span-1
newx<-rep(NA,length(x)-
first
> I transposed data ,(rows become columns)so row is control&treatment and
> columns are gene names.(so I have 2 matrix with same row and different
> column).This information is enough?
>
>
>
>
> On Tuesday, January 31, 2017 1:06 AM, Jim Lemon
> wrote:
>
>
>
-function(x,span,FUN="mean",na.rm=FALSE) {
> jump<-span-1
> newx<-rep(NA,length(x)-jump)
> for(i in 1:length(newx))
> newx[i]<-do.call(FUN,list(x[i:(i+jump)],na.rm=na.rm))
> return(newx)
> }
>
> #test<-1:12
> names(era.sta)<-month.ab
ext:
> "grep(".C",lnc$name)"
>
> I`m so sorry,maybe I do not understand you again.
>
>
> On Tuesday, January 31, 2017 1:27 AM, Jim Lemon
> wrote:
>
>
> Hi Elham,
> This is about the same as your first message. What I meant was, what
> do the
After scrupulous textual analysis, I conclude that you have at least
one NA/NaN/Inf in b$induction. There is also a hint that you should
acquaint yourself with family="binomial".
Sherlock
On Tue, Jan 31, 2017 at 11:18 AM, CHIRIBOGA Xavier
wrote:
> Dear colleagues,
>
>
> I am trying to perform GL
Hi Kwesi,
A mistake in the last email. Don't try to replace the column in
era.sta as the result will be a different length. Try this:
newera.sta2<-collapse.values(era.sta[,2],3)
Jim
On Tue, Jan 31, 2017 at 10:32 AM, Jim Lemon wrote:
> Hi Kwesi,
> The function collapse_values wil
Hi Elham,
On Tue, Jan 31, 2017 at 7:28 PM, Elham - wrote:
> Hi Dear Jim,
>
> I did it, both return a vector of name of the genes with different length,as
> I said before I have list of coding and noncoding so the length are not
> same.
>
> where is number?!
>
Not in the values you are extracting
(era.nodes.days,start=as.Date("1980-01-01"),end=as.Date("2016-12-31"))
>
> mon.t1<-as.numeric(format(index(era.nodes.days.t1),"%m"))
> seas.t1 <-as.numeric(format(index(era.nodes.days.t1),"%Y"))
> era.nodes.days.t1<-cbind(era.nodes.days.t1,mon.t1,
> there is gene name instead of number
>
>
> On Tuesday, January 31, 2017 12:20 PM, Jim Lemon
> wrote:
>
>
> Hi Elham,
>
> On Tue, Jan 31, 2017 at 7:28 PM, Elham - wrote:
>> Hi Dear Jim,
>>
>> I did it, both return a vector of name of the genes with di
Hi Md,
This kind of clunky, but it might do what you want.
df1<-read.table(text="DateRainfall_Duration
6/14/2016 10
6/15/2016 20
6/17/2016 10
8/16/2016 30
8/19/2016 40",
header=TRUE,stringsAsFactors=FALSE)
df1$Date<-as.Date(df1$Date,"%m/%d/%Y")
df2<-read.t
rateful for any help.
>
> Kwesi
>
> On Wed, Feb 1, 2017 at 1:12 AM, Jim Lemon wrote:
>>
>> Hi Kwesi,
>> I worked through your code below, and I think that when you have the
>> two variables "mon.t1" and "seas.t1" you can select a "
have been able to manipulate the
> barplot with "margin" to get the plot in a better shape but now the y-axis
> is out of the plot zone. I have attached my script. Kindly have a look. Its
> with the data I earlier sent.
>
>
>
> On Thu, Feb 2, 2017 at 1:08 AM, Jim Le
/2016 17.2*
>
>
> Expected output:
>
>
> df3 <-
>
> Rate.Removal.Date Date Rainfall_Duration
> 6/17/2016 6/14/2016 10
> 6/17/2016 6/15/2016 20
> 6/17/2016 6/17/2016 10
> 6/30/2016 6/14/2016 10
> 6/30/2016 6/15/2016 20
> 6/30/2016 6/17/2016
getting this error:
> Error in `*tmp*`[[j]] : subscript out of bounds
> Do you have any solution for that? You have already done a lot. So, I
> really appreciate your effort. Thanks
>
> --
> *From:* Jim Lemon
> *Sent:* Thursday, February 2, 2017 2:07 PM
>
> *To:* Md Sami
Hi Ana,
Here is one way:
pathway1<-LETTERS[1:5]
pathway2<-c("A","C","F")
pathway3<-c("B","D","E")
intersect.mat<-matrix(0,nrow=3,ncol=3)
rownames(intersect.mat)<-paste("pathway",1:3,sep="")
colnames(intersect.mat)<-paste("pathway",1:3,sep="")
for(row in 1:3) {
for(col in 1:3)
intersect.mat[row,
Hi Somayya,
When you perform a t-test on two sets of numeric values, the answer
you get tells you how likely it is that those two sets of numbers came
from the same distribution. What most people are interested in is
whether the means of those two distributions are different. Let's see,
you seem to
Hi Alejandro,
How about:
-sign(x) * sign(x) * x
Jim
On Fri, Feb 10, 2017 at 6:30 AM, Alejandro wrote:
> Hello,
>
> I’ve tried googling for an answer to this but I simply can’t find something
> that fixes my problem. I have a long numerical vector with positive, negative
> and null values. I
Hi Tahereh,
In the code you provided, there seems to be a mistake in the calls to
"sample" in that you haven't specified the "size" argument. You should
have gotten an error there. Also, you have assigned both samples to
the same variable name, so there will be no "boot.p" when the call to
t-test i
901 - 1000 of 3432 matches
Mail list logo