those names. I
don't know why you would change the names to obscure ones like "V1",
but I suggest a look at the "names" function. The answer to your
question should now be clear to you.
Jim
On Mon, Dec 28, 2020 at 8:47 AM Jim Lemon wrote:
>
> Hi Seyet Ali,
> If you
Hi Chao,
I think what you are looking for is the "rapply" function in the base
package. Not sure that it can do exactly what you request but worth a
look.
Jim
On Tue, Dec 22, 2020 at 6:36 AM Chao Liu wrote:
>
> I want to apply a sample function to a nested list (I will call this list
> `bb`)
It does remind me of counting on one's fingers, though.
Jim
On Sun, Dec 20, 2020 at 4:38 PM Bert Gunter wrote:
>
But c(x[-1], x[1]) is, which is not so terrible, after all...
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
Hi Chao,
You have discovered one of the surprising things about the extraction
operator "[". It expects to get an object consisting of integers (like
1,2,3,...) or logical values (TRUE,FALSE or 0,1). As you have passed
the _values_ of your cluster, it can't deal with the negative numbers
as they
Hi Ani,
Not sure about this, but is this what you want?
ann10<-aggregate(mon10[3:12],list(mon10$Group.1),which.max)
Jim
On Wed, Dec 16, 2020 at 4:55 PM ani jaya wrote:
>
> Dear R-Help,
>
> I have a data frame containing monthly maxima of rainfall in 10
> locations for 30 year and want to look
")
> Similarly, I would like to draw a dashed vertical background grid. But it is
> unclear to me how to direct R to draw a vertical dashed background grid
> because I am again baffled how to specify to R a date value such as
> 2018-10-20 @18:00. I welcome your guida
:A I would take rs4980905 to be in column
> "rsid", C in column "ref_allele" and A to be in column "eff_allele",
> WGT column would just be filled with a name of the particular RDat
> file.
>
> So the issue is in these lines:
>
> a <- get(load(files[i]))
gt; ...
>
> Slow code was posted just to show what was running very slow and it
> was running. I really need help fixing parallelized version.
>
> On Tue, Dec 15, 2020 at 7:35 PM Jim Lemon wrote:
> >
> > Hi Ana,
> > My guess is that in your second code fragment you
Hi Ana,
My guess is that in your second code fragment you are assigning the
rownames of "a" and the _values_ contained in a$blup to the data.table
"data". As I don't have much experience with data tables I may be
wrong, but I suspect that the column name "blup" may not be visible or
even present
Hi Gregory,
On Mon, Dec 14, 2020 at 12:34 PM Gregory Coats wrote:
>...
> Is there a convenient way to tell R to interpret “2020-12-13” as a date?
>
Notice the as.Date command in the code I sent to you. this converts a
string to a date with a resolution of one day. If you want a higher
time
Hi Gregory,
Here's a start:
gcdf<-read.table(text="2020-01-05 15.973
2020-02-15 18.832
2020-03-10 17.392
2020-05-04 14.774
2020-06-21 19.248
2020-08-01 14.913
2020-08-27 15.226
2020-09-28 14.338
2020-11-09 18.777
2020-12-11 19.652",
header=TRUE,stringsAsFactors=FALSE,
t this second factor in the legend.
>
> Probably the last resort is to rewrite original code which I would like to
> avoid as I am not so experienced in grid graphics.
>
> Best regards
> Petr
>
> > -Original Message-
> > From: Jim Lemon
> > Sent: Monday,
Hi Petr,
Here's an attempt, using the example in biplot.princomp:
biplot(princomp(USArrests))
> par("usr")
[1] -497.2263 624.8856 -497.2263 624.8856
legend(-180,600,c("State","Crime"),lty=1,col=c("black","red"))
Jim
On Mon, Dec 7, 2020 at 6:23 PM PIKAL Petr wrote:
>
> Dear all
>
> I try to
Hi Jose,
Searching for "soil pH data" reveals a bucketload of sites with this
sort of data in lots of formats.
Jim
On Thu, Dec 3, 2020 at 10:07 PM José Luis Aguilar
wrote:
>
> Dear list members,
>
> I am looking for soil pH data for Europe and Africa, but I don't.
> I need them to set up a
t;-aggregate(vmax~hour+ampm,ssdf,mean)
This does a full day. To do more, add the date_POSIX field to the
aggregate command. If you have the date and time in one field you'll
have to split that. That will distinguish the AM/PM means in each day
as well as hour.
Jim
On Thu, Dec 3, 2020 at 2:10 PM J
Hi Stefano,
I read in your date-time as two separate fields for convenience. You
can split your single field at the space to get the same result.
ssdf<-read.table(text="date_POSIX time_POSIX vmax
2018-02-01 00:00:00 27
2018-02-01 00:10:00 41
2018-02-01 00:20:00 46
2018-02-01 00:30:00 39
Hi Steven,
You seem to be assigning the result of me.oprobit(obj) to v instead of
printing it. By appending ";v" tp that command line, you implicitly
call "print".
Jim
On Mon, Nov 30, 2020 at 7:15 PM Steven Yen wrote:
>
> I hope I can get away without presenting a replicable set of codes
>
Yep, that's it. It's not Kwrite that is doing it, but Gmail. I'll try
to find a Gmail help list or help desk that can provide info. thanks.
Jim
On Mon, Nov 23, 2020 at 12:35 PM David Winsemius wrote:
>
>
> On 11/22/20 5:20 PM, Rolf Turner wrote:
> > On Mon, 23 Nov 2020 10:07:4
Hi again,
I finally trapped the character (hexadecimal C2 capital A hat) with
some low trickery.
Jim
On Mon, Nov 23, 2020 at 10:07 AM Jim Lemon wrote:
>
> Hi all,
> I have encountered a problem in some emails with invisible characters
> in code snippets that throw an error
Hi all,
I have encountered a problem in some emails with invisible characters
in code snippets that throw an error when pasted into the terminal
window:
Error: unexpected input in:
"star_wars_matrix<-matrix(box_office,nrow=3,byrow=TRUE,
�"
This morning, after two hours of intense frustration, I
Hi Gayathri,
Maybe the cmscu package?
https://github.com/jasonkdavis/r-cmscu
Jim
On Thu, Nov 19, 2020 at 6:30 AM Gayathri Nagarajan <
gayathri.nagara...@gmail.com> wrote:
> Hi Team
>
> Iam a new learner trying to build n gram models from text corpus and trying
> to understand the modified
Oops, I sent this to Tom earlier today and forgot to copy to the list:
VendorID=rep(paste0("V",1:10),each=5)
AcctID=paste0("A",sample(1:5,50,TRUE))
Data<-data.frame(VendorID,AcctID)
table(Data)
# get multiple vendors for each account
dupAcctID<-colSums(table(Data)>0)
Data$dupAcct<-NA
# fill in
Hi Elaine,
There seems to be a popular contest to discover offence everywhere. I don't
think that it does anything against racism, sexism or
antidisestablishmentarianism. Words are plucked from our vast lexicon to
comfort or insult our fellows depending upon the intent of the user. It is
the
Hi Yuan,
The package named "Enmix" is maintained on Bioconductor. It seems to be
specific to particular lab equipment and so all I can advise is:
1) Try your question on the Bioconductor help list
2) If no help there contact Zongli Xu (the maintainer)
Jim
On Thu, Nov 12, 2020 at 11:40 AM Yuan
Hi Gaspar,
I can see why you are having trouble with this. The "as.inputoutput"
function seems to be the core. While the manual claims you can just input
the "Z", "RS_label" and and "X" matrices to "as.inputoutput" and get the
"InputOutput" object that you need for all the other functions, it
Sure John,
df1<-df1[order(as.character(df1$year),decreasing=TRUE),]
Jim
On Tue, Nov 10, 2020 at 8:05 PM John wrote:
> Thanks Jim. Can we do descending order?
>
> Jim Lemon 於 2020年11月10日 週二 下午4:56寫道:
>
>> Hi John,
>>
>> df1<-sapply(df1,as.character)
>
Hi John,
df1<-sapply(df1,as.character)
Should do what you ask. The error message probably means that you should do
this:
df1<-df1[order(as.character(df1$year)),]
as "year" is the name of the first column in df1, not a separate object.
Jim
On Tue, Nov 10, 2020 at 6:57 PM John wrote:
> Hi,
>
Hi Luigi,
If I understand your request:
library(prettyR)
apply(as.matrix(df),1,Mode)
[1] "C" "B" "D" ">1 mode" ">1 mode" ">1 mode" "D"
[8] "C" "B" ">1 mode"
Jim
On Sat, Oct 31, 2020 at 7:56 PM Luigi Marongiu
wrote:
> Hello,
> I have a large dataframe (1 000 000
Hi Hannah,
Using the same code I sent before, you can append the partner codes to the
household code. I apologize, but I don't know how to use the
dplyr/tidyr/... stuff so this is written in straight R code using logic
statements.
ipumsi_8_dta<-
read.table(
text="country year sample serial
Hi Hannah,
Have you tried:
summary(ipumsi_8_dta$couple_id)
Jim
On Fri, Oct 30, 2020 at 7:34 PM Hannah Van Impe
wrote:
> Hello
>
> I have a question. I made an r-script and did a few commands needed to
> make some new variables. They all work out well, and when I run the
> commands, the
Hi Joy,
As Rui noted, you can get a plot with:
jk.dat<-runif(100,1000,1)
plot(jk.dat,type="l")
This plots your vector of 100 uniformly distributed numbers against their
"index" (the order in which they appear in the vector). I suspect your
problem is that you want to define a vector of "x"
Hi Hannah,
Yes, that does give me more insight. The polygyny only doesn't matter, for
even if there was polyandry it could be coded in the same way. If I
understand this correctly you have one variable (SPRULE) that must contain
information about the household of the individual and the identities
Hi Hannah,
Without knowing how the data are organized and what each numeric
code means, it is a bit difficult. If it is assumed that each row in the
data frame(?) ipumsi_8_dta is a case (individual) and an individual may
have zero or more spouses, there would have to be more than one field for
Hi Mir,
Without knowing what the data looks like, this is only a guess.
read.table() expects a white space delimiter and if you have a space
in one of your column names it will consider it as two names instead
of one. How many columns do you expect?
Jim
On Mon, Oct 5, 2020 at 6:14 PM Mohammad
Hi Faheem,
This is a complete guess, but the hours of the day may range from 0 to
23 not 1 to 24. So you may be asking for an out of range hour.
Jim
On Fri, Oct 2, 2020 at 10:00 PM Faheem Jan via R-help
wrote:
>
>
> Hello , i am working in the functional time series using the multivariate
>
omment out the last 2 lines of the above 3 lines, and created a
> customized lines2 function. Now it works!
>
> It's fun to learn clip().
>
> Thanks,
>
> John
>
>
> On Wednesday, September 30, 2020, 01:47:55 AM PDT, Jim Lemon
> wrote:
>
>
> Hi John,
> Hmmm
im[4])
> abline(h=0.5,col=2) ### YES, clipping() works!
>
> lines(fit2, col = 3:4,lty=2) ### clipping does not work! reset to default
> plot region
> abline(h=0.4,col=2) ### NO, clipping() does not work!
>
> So disappointed with this, otherwise this would be such a
lim<-par("usr")
> clip(450,xylim[2],xylim[3],xylim[4])
> lines(fit2, col = 3:4,lty=2)
>
> I can still see that the extra horizontal line on the top.
>
> Can you or anyone have any suggestion what went wrong?
>
> Thanks,
>
> John
>
>
> On Tuesday, Septe
Hi John,
Perhaps the most direct way would be:
plot(fit1, col=1:2)
xylim<-par("usr")
clip(4,xylim[2],xylim[3],xylim[4])
lines(fit2,col=1:2)
Remember that the new clipping rectangle will persist until you or
something else resets it.
Jim
On Tue, Sep 29, 2020 at 10:34 AM array chip via R-help
Hmmm, maybe without the caps...
Jim
On Sat, Sep 26, 2020 at 8:20 AM Jim Lemon wrote:
>
> Hi Luigi,
> Good illustration. Maybe if I can integrate vertical lines to show the
> nesting instead of bars it would work better. While it makes the
> nesting much clearer, some people may s
Hi Luigi,
Good illustration. Maybe if I can integrate vertical lines to show the
nesting instead of bars it would work better. While it makes the
nesting much clearer, some people may still accuse you of using a bar
plot.
# new functions with the modifications
source("barNest.R")
Hi Luigi,
Here is a quick example of how points would look in the same
configuration. Perhaps with end caps to show the nesting it may be
more like what you want.
Jim
On Thu, Sep 24, 2020 at 6:34 PM Jim Lemon wrote:
>
> Oh, sorry, forgot about the colors. A list beginning with the
Hi Dan,
This list has a "no homework" policy, but as you really do seem to be
struggling, I'll suggest that you read the help page for "abs"
carefully and learn about "<-" (assign a value). Perhaps these will
give you a start.
Jim
On Thu, Sep 24, 2020 at 6:19 PM Dan Bosio wrote:
>
> Hi there
>
Oh, sorry, forgot about the colors. A list beginning with the color
for the overall summary, then colors for the first factor and so on.
See the help page for examples.
Jim
On Thu, Sep 24, 2020 at 6:32 PM Jim Lemon wrote:
>
> Hi Luigi,
> I thought a lot about that when I wa
On Thu, Sep 24, 2020 at 6:25 PM Luigi Marongiu wrote:
>
> Thank you Jim, that is really nice!
> But is there a way to use dots instead of boxes? and how do I control
> the colours?
> Best regards
> Luigi
>
> On Thu, Sep 24, 2020 at 9:29 AM Jim Lemon wrote:
> >
> &g
Hi Luigi,
To display a nested breakdown like this I would suggest barNest. This
is one way to display the nesting. Note that if you change the order
of the factors in the formula you will get a different plot, so think
about how you want the summaries nested. Error bars can only be
displayed on
Hi Jinsong,
This is similar to the "arctext" function in plotrix. I don't want to
do all the trig right now, but I would suggest placing the characters
on the curve and then offsetting them a constant amount at right
angles to the slope of the curve at each letter. I would first try
having a
Hi Augustinius,
You are probably familiar with some of these:
http://finzi.psych.upenn.edu/R/library/geepack/html/geeglm.html
https://faculty.washington.edu/heagerty/Courses/b571/homework/geepack-paper.pdf
https://rdrr.io/cran/geex/f/vignettes/articles/mestimation_bib.Rmd
Good luck with it.
Jim
Hi Augustinius,
You have been set a problem that requires a lot more information than
is in your request. Also, you have flagged it as a "homework" problem,
so you are unlikely to get much help on this list. Sadly, this sort of
problem sometimes arises when being nice to the instructor is more
Hi Andrew,
>From your last email the answer to your problem may be the
findFreqTerms() function. Just increase the number of times a term has
to appear and check the result until you get the matrix size that you
want.
Jim
On Fri, Sep 18, 2020 at 5:32 PM Andrew wrote:
>
> Hi Abby
>
> Many thanks
Hi Peri,
Without the data this is only a guess, but are the values of East and
center within the limits of the plot generated by Nation?
Jim
On Fri, Sep 18, 2020 at 10:12 AM peri He wrote:
>
> Dear Friends,
>
> I am trying to add two time series curves into one plot. I don't get any
> error
Hi Ana,
Sorry it's not in ggplot, but it may help:
d<-read.table(text="CHR counts name
1 193554 old
2 220816 old
3 174350 old
4 163112 old
5 168125 old
6 182366 old
7 143023 old
8 147410 old
9 122112 old
10 138394 old
11 130069 old
12 124850 old
13 104119 old
d (to make x-axis labels clearly visible)? I imagine
> if work with some other x-axis labels I'd just have to play around with the
> width, height, srt and cex parameters?
>
> Best regards,
>
> Paul
>
>
> El mar., 15 de septiembre de 2020 7:06 p. m., Jim Lemon
> escr
Hi Paul,
This looks very familiar to me, but I'll send my previous suggestion.
library(qcc)
x11(width=13,height=5)
pareto.chart(dataset2$Points,xaxt="n")
library(plotrix)
staxlab(1,at=seq(0.035,0.922,length.out=140),
labels=substr(dataset2$School,1,20),srt=90,cex=0.5)
Jim
On Wed, Sep 16, 2020
Hi Stefano,
What about this?
df$months<-format(df$data_POSIX,"%Y-%m")
snow_means<-by(df$value,df$months,mean)
Jim
On Mon, Sep 14, 2020 at 8:19 PM Stefano Sofia
wrote:
>
> Dear R-list users,
> I know that this is a trivial question, but I already wasted quite a large
> amount of time on that.
Hi Nevil,
As I don't have the filematrix package this is really an "any suggestion":
FM[,which(colnames(FM) %in% c("one","three"))]
Jim
On Tue, Sep 8, 2020 at 9:43 PM nevil amos wrote:
>
> Is there a way to get columns out of a filematrix using the column name
> directly in the same way that
_days_1949.tif")
>
> a<-array(NA,dim=c(dim(r)[1:2],70))
>
> i <- 1
>
> for (year in 1949:2019) {
>
>
> fi<-paste0("C:/Teaching/MSCprojects/2020/Ahmet/soilm/max_consecutive_days_",year,".tif")
>
> r<-raster(fi)
>
> a[,,i]&
Hi Hesham,
It think you are looking for something like this:
truth<-data.frame(G1=sample(LETTERS[1:4],20,TRUE),
G2=sample(LETTERS[1:4],20,TRUE))
truth
truth$G3<-as.numeric(truth$G1 == truth$G2)
truth
Note that like quite a few emails produced with Javascript formatting,
there are embedded
Hi Luigi,
Maybe just:
plot(as.numeric(factor(x,levels=x)),y,xaxt="n",
main="Concentration by effect",
xlab="Concentration",ylab="Effect")
axis(1,at=1:4,labels=x)
Jim
On Thu, Aug 27, 2020 at 10:16 PM Luigi Marongiu
wrote:
>
> Hello,
> I have a dataframe as follows:
> ```
> x = c("0 pmol", "10
Hi Luigi,
Try this:
brkdn.plot(y~x+z,data=Q)
Jim
On Thu, Aug 27, 2020 at 9:57 PM Luigi Marongiu wrote:
>
> Hello,
> I have a dataframe as follows
> ```
> x = c(rep("1000 pmol", 2), rep("100 pmol", 2), rep("10 pmol", 2),
> rep("0 pmol", 2))
> y = c(2.7642, 2.8192, 2.1976, 2.2816, 1.8929,
Hi Eric,
There are a few mysteries in your request. As we don't know what "des"
is, it is difficult to see why it does not have the correct number of
dimensions. It looks like it should be an n x 6 matrix, but is that
what it really is and does the mlogit function expect such a matrix?
JIm
On
Hi Luis,
I had a quick look at the "diagram" package, which seems to accept
transition matrices. I don't have it installed, but the help pages are
fairly easy to follow and may do the job for you.
Jim
On Wed, Aug 26, 2020 at 5:50 PM Luis Fernando García
wrote:
>
> Dear all,
>
> I am wanting to
Hi Luis,
As so often happens, the image didn't make it. Try PNG or PDF format.
Without seeing what you want, it's only guessing.
Jim
On Mon, Aug 24, 2020 at 6:34 PM Luis Fernando García
wrote:
>
> I am wanting to make a flow diagram like the one attached as an example for
> the given dataset.
>
Hi Mike,
This looks to me as though the error is not being generated by plot,
but by a method specific to the package, maybe something with a name
like plot.chart_Series, that is barfing on a vector of NA values.
Jim
On Mon, Aug 24, 2020 at 1:01 AM Mike wrote:
>
> Hi Jim,
>
> on 21.08. you
Hi Mike,
Try this:
plot (chart_Series (sample.xts[,1], subset=subset, TA=ta),
type="n",ylim=c(minimum,maximum))
where minimum and maximum are the extremes of the plot if there were
any valid values.
Jim
On Fri, Aug 21, 2020 at 6:32 PM Mike wrote:
>
> Dear R users,
>
> I have already asked
Hi Paul,
I ran this:
library(qcc)
pareto.chart(dataset2$Points)
and like you, got the chart. As you have 140 long labels, I thought at
first it might be the function trying to abbreviate some of them and
actually displaying about 1 in 5. Looking at the code for the
function, this is not the
"Total"),
> values = c("red", "blue", "green")) +
> ylim(0, 200) +
>labs(x = "Date", y = "Number of Tests")+
>ggtitle("COVID-19 Tests in Ohio \n (8/17/20)")+ <- line 33
>
Hi Philip,
My fault for assuming that what worked for the sample data would work
for the entire data set. If you run the following code:
# read the file into a data frame
phdf<-read.csv("phdf.csv",stringsAsFactors=FALSE)
print(dim(phdf))
# create a logical variable for the subsetting step
Hi Philip,
Not very elegant, but:
phdf<-read.table(text="Minute Second Speed
29 47 0
29 53 0
29 59 0
30 5 0
30 11 0
30 17 0
30 23 0
30 29 0
30 35 0
30 41 0
30 47 0
30 53 0
30 59 0
31 5 0
31 11 0
31 17 0.402649
31 23 0.671081
31 29 1.588225
31 35 2.438261
31 41 2.706693
31 47
Hi Abdoulaye,
It looks to me as though your offsets are in hours, not days. You can
get a rough date like this:
time<-c(1569072,1569096,1569120,1569144,
1569168,1569192,1569216,1569240)
time_d<-as.Date("1800-01-01")+time/24
time_d
[1] "1979-01-01" "1979-01-02" "1979-01-03" "1979-01-04"
m,
>
>
>
> Could you help me to remove NA values which are water values ?
>
>
>
>
>
> Kimden: Jim Lemon
> Gönderilme: 7 Ağustos 2020 Cuma 22:53
> Kime: ahmet varlı
> Konu: Re: [R] find number of consecutive days in NC files by R
>
>
>
> There a
Hi Pedro,
Scratch that last email. I remembered that "tus.datos" was so large
that it was hanging my R session last time. However, this seems to
work:
tus.datos<-read.table("datayield.csv",sep=";",
header=TRUE,stringsAsFactors=FALSE)
row_subset<-tus.datos$DATA_TYPE_FM %in% data_types &
he error is
>
> for (PERIOD="TRUE") {
> Error: inesperado '=' in "for (PERIOD="
> >
> >
> > plot(x, y)
> Error: no se puede ubicar un vector de tamaño 1.3 Gb
> >
> > }
> Error: inesperado '}' in "}"
> >
>
>
>
le$lengths[run]
}
Jim
On Fri, Aug 7, 2020 at 3:17 PM Jim Lemon wrote:
>
> Hi Ahmet,
> Here is a way to get the result you ask for for one geographic grid
> cell. You may want more detail or something, but this is a
> "reproducible example".
>
> # retrieved from
>
0.000 0.000 0.000 0.000 0.000 0.000 0.000
>
> [3,] 0.000 0.000 0.000 0.000 0.000 0.000 0.000
> 0.000 0.000 0.000 0.000 0.000 0.000 0.000
>
> [4,] 0.358 0.358 0.358 0.358 0.358 0.358 0
Hi Ahmet,
I think what you are looking for can be done using run length encoding (rle).
# make up some data
soil_moisture<-sin(seq(0,4*pi,length.out=730))+1.1
dates<-as.Date(as.Date("2018-01-01"):as.Date("2019-12-31"),
origin=as.Date("1970-01-01"))
# get a logical vector for your condition
Hi Pedro,
I'm not exactly sure of what you want, but try this:
# I downloaded the CSV file as datayield.csv
tus.datos<-read.table("datayield.csv",sep=";",header=TRUE)
library(scatterplot3d)
data_types<-c("PY_1Y","PY_2Y","PY_3Y","PY_4Y","PY_5Y","PY_6Y","PY_7Y")
row_subset<-tus.datos$DATA_TYPE %in%
ut got the error
>
> for(i in 1975:2017){
> for(j in 1:44){
> mddat2[j]<-mddat[mddat$Year == i & mddat$Month >= 7 |
> mddat$Year == (i+1) & mddat$Month <= 6,]
> }
> m[j]=mean(mddat2$Value)
>
> }
> m
>
> Please help me in th
in advance.
>
> Md
>
>
> On Mon, Aug 3, 2020 at 12:33 PM Rasmus Liland wrote:
>>
>> On 2020-08-03 21:11 +1000, Jim Lemon wrote:
>> > On Mon, Aug 3, 2020 at 8:52 PM Md. Moyazzem Hossain
>> > wrote:
>> > >
>> > > Hi,
>> >
Hi Md,
One way is to form a subset of your data, then calculate the means by year:
# assume your data is named mddat
mddat2<-mddat[mddat$month < 7,]
jan2jun<-by(mddat2$value,mddat2$year,mean)
Jim
On Mon, Aug 3, 2020 at 8:52 PM Md. Moyazzem Hossain wrote:
>
> Hi,
>
> I have a dataset having
Hi Engin,
If you know what all the levels are, you can specify these in the
format command:
Classification_Description<-factor(Classification_Description,
levels=c("Total Surplus (+) or Deficit (-)","Borrowing from the Public",
"By other means"))
This ensures that all the levels are encoded
Hi Ritwik,
Carlos made an excellent suggestion and there are at least two ways to
plot "machine" and "region" as the cells in a 2D matrix and then add
two more variables (say count and price) as the attributes of each
cell. Is the data you are using publicly available? If so a
demonstration of
Hi Ritwik,
I haven't seen any further answers to your request, so I'll make a
suggestion. I don't think there is any sensible way to illustrate that
many data points on a single plot. I would try to segment the data by
machine type or similar and plot a number of plots.
Jim
On Fri, Jul 24, 2020
r code is related to call a music player?
>
> 2. Which part is related to call a music file?
>
> I want to do this on my laptop, so I need to understand your code (the answer
> to the above questions).
>
> Regards,
> Vahid
>
>
> On Wed, Jul 22, 2020 at 1:45 AM J
Hi John,
Perhaps "dendroPlot" in the plotrix package?
JIm
On Thu, Jul 23, 2020 at 11:00 AM array chip via R-help
wrote:
>
>
> Hello everyone,
>
> I saw this scatterplots from a paper and thought it looked very nice:
>
>
Hi Jason,
I assume that you actually have "WVS.RData" in your working directory
when you try to load it. Otherwise you will get an error message. If
you don't get an error message when you do this:
load("WVS.RData")
there will be a new object in your workspace. So if you want to see
what the
Hi Ahson,
Guessing what your data frame might look like, here are two easy ways:
All_companies<-data.frame(year=c(1970:2015,2000:2015,2010:2015),
COMPANY_NUMBER=c(rep(1,46),rep(2,16),rep(3,6)),
COMPANY_NAME=c(rep("IBM",46),rep("AMAZON",16),rep("SPACE-X",6)))
# easy ways
Hi Vahid,
The following command:
system("mplayer /home/jim/songs/bimbo_soul.mp3",
wait=FALSE,ignore.stdout=TRUE)
works fine for me. Of course you'll have to specify a music player and
music file that you have...
Jim
On Wed, Jul 22, 2020 at 4:02 AM Vahid Borji wrote:
>
> Hello my R friends,
>
Hi Byron,
As in the help page, three types of arrows can be specified. In the
"rotation" type, "width" is the parameter that determines the diameter
of the cylindrical shaft as a fraction of the "barb", the cone at the
end. In the default "extrusion" arrow, "thickness" is the fraction of
the
Hi Pedro,
Assuming that you get a vector of daily percentage changes:
dpc<-c(+3.1, -2.8, +1.7, +2.1)
get the cumulative change and add 100:
cumsum(dpc)+100
[1] 103.1 100.3 102.0 104.1
You can then plot that. As Rui noted, your mail client is inserting
invisible characters that prevent cutting
Hi Milu,
This is similar to the "birthday age" problem as it is much easier to
deal with the constant "12 months in a year" rather than the highly
variable number of days between two dates:
monthno2my<-function(x,startyear=1861,startmonth=2400) {
year<-startyear+(x-startmonth)%/%12
;),pch=19,
col=c("lightgray","green","orange"))
dev.off()
}
I've been meaning to finish off the "supsubtext" function for a while.
Jim
On Sun, Jul 12, 2020 at 11:20 AM Paulina Skolasinska
wrote:
>
> Sorry for misspelling your name, Jim. Well, i
I'll admit that I cut my teeth on ASCII, but I worried about your
reliance on that ancient typographic ordering. I wrote a little
function:
al2num_sub<-function(x) {
xspl<-unlist(strsplit(x,""))
if(length(xspl) > 1)
xspl<-paste(xspl[1],which(letters==xspl[2]),sep=".")
return(xspl)
}
,
> group=1, color="black"), method = "pearson",label.y=0.5,
> label.x.npc = c("center"),
> position = position_nudge(y = 0.015 * 0.5))
>
> ggsave(p1, file=paste0("TestAge_", names(df)[i], ".png")
Hi Paulina,
Without data it's hard to work out what you are doing. Even a small
simulated data set would help to get answers.
Jim
On Fri, Jul 10, 2020 at 11:49 PM Paulina Skolasinska
wrote:
>
> 'm using ggplot2 to plot two variables at a time. I'm plotting two age groups
> and overall data on
Hi Luigi,
This is a result of the "pretty" function that calculates hopefully
good looking axis ticks automatically. You can always specify
ylim=c(1.0E09,max(Y)) if you want.
Jim
On Thu, Jul 9, 2020 at 10:59 PM Luigi Marongiu wrote:
>
> Hello,
> I have these vectors:
> ```
> X <- 1:7
> Y <-
Hi Marc,
The "htmlize" function in the prettyR package might be what you are looking for.
Jim
On Thu, Jul 9, 2020 at 5:02 AM Marc Roos wrote:
>
>
>
> I would like to parse some input to an R script and use its result
> output (maybe in json) on a web page. I think this shiny framework is a
>
Hi Kathan,
This is a very lazy answer as I haven't tested it. I think you will
need to wrap your loop in a function and return the modified list_df
to assign it like this:
add_IDs<-function(xdf) {
for(i in seq_along(xdf)) {
xdf$position_tab_[[i]]$ID <-
Hi Drake,
This is a guess on my part, but what about:
\
q3only<-unclean_data[unclean_data$question == 3,]
then perform your operations on q3only
Jim
On Thu, Jul 2, 2020 at 8:35 PM Drake Gossi wrote:
>
> Hello!
>
> Question. I'm dealing with a large excel sheet that I'm trying to tidy
> and
Hi Eddie,
Upon reading your initial request more carefully, the last command should be:
plot(nspec/nspec[50]*100,type="l",xlab="Sites",
ylab="Species accumulation (%)",ylim=c(1,100))
Jim
On Wed, Jun 17, 2020 at 8:23 AM Jim Lemon wrote:
>
> Hi Edd
201 - 300 of 3379 matches
Mail list logo