Hi,
sorry to hear, but as Jeff pointed out, such problems are beyond the
scope of this list.
Anyway, if you have not yet closed the editor, hitting ctrl+z (i.e.
undo) - once or several times - could be worth trying.
Best,
Kimmo
pe, 2025-05-30 kello 00:48 -0700, Jeff Newmiller via R-help kirjo
Hi,
using the library "stringi" allows this:
> unlist(stringr::str_split(x, "\n"))
[1] "abc" "def" """ghi"
Best,
Kimmo
ke, 2025-02-05 kello 09:35 -0500, Duncan Murdoch kirjoitti:
> Thanks to Rui, Peter and Tanvir! Peter's seems to be the fastest of
> the
> 3 suggestions so far on the littl
Hi,
this code could/should work:
--- snip ---
PopByDayByAQIminus %>%
ggplot(aes(x=AQI_Cat,y=TotalPop/100),
group=Day,color=Day,shape=as_factor(Day),
linetype = as_factor(Day)) +
geom_point(size=4,alpha=0.7)+
geom_line(linewidth=1.5,alpha=0.3)+
theme(axis
ivision of Gerontology and Paliative Care,
> 10 North Greene Street
> GRECC (BT/18/GR)
> Baltimore, MD 21201-1524
> Cell phone 443-418-5382
>
>
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> ht
Hi,
you could use "scan" instead, it seems to work fine also when wrapped
around "unz".
Or, alternatively, you could use "unzip" instead of "unz". It works as
expected, i.e. reads the last incomplete line and throws a warning about
this.
So it seems to me that "unz" creates a non-blocking con
one.
>
> Can anyone point me in the right direction? Thanks.
>
> cheers,
>
> Rolf Turner
>
--
Kimmo Elo
Senior Lecturer | Adjunct professor, Dr.
University of Eastern Finland
Department of Geographical and Hist
Hi,
I might have misunderstood your point, but why should a Date object
store a timezone, since timezone is an attribute of time, not date?
Your tz-examples force R to present a timezone, resulting - this is my
assumption - to default (=UTC) as there is no other information available.
Best,
Ki
Hi,
why would this simple procedure not work?
--- snip ---
mydf <- data.frame(id_station = 1234, string_data = c(2024, 12, 1, 0, 0),
rainfall_value= 55)
mydf$string_data <- as.factor(mydf$string_data)
values<-as.integer(levels(mydf$string_data))
for (i in 1:length(values)) {
assign(pa
lapsed$membership)
> %>%
>
> set_edge_attr(name = "color",
>
> value = c(viridis::viridis(21))
>
> [match(E(.)$type, c(factor(V(.)$name)))]) %>%
>
> set_vertex_attr(name = "trans_v_net", value = c(transitivity(.,
Dear Sibylle,
your example is not working! E.g. no data for "aes_collapsed".
Best,
Kimmo
ke, 2024-03-20 kello 19:28 +0100, SIBYLLE STÖCKLI via R-help kirjoitti:
> Dear community
>
> I am using ggraph to plot a network analysis. See part 2 in the working
> example.
> Besides different colors fo
Hi,
a quick additional note: try
"edge.width= E(.)$weight"
instead of the current "edge.width= network". Seems to work and makes a
visible difference...
HTH,
Kimmo
su, 2024-02-25 kello 19:11 +, Kimmo Elo kirjoitti:
>
> Hi again,
>
> your code i
Hi again,
your code is still not reproducible without modifications, but I
succeed in getting the data straight. All read.csv-command are missing
'sep="\t"', it is need to read you tsv-data.
And it could be more reproducible if you used e.g.
--- snip ---
aes<-read.csv(text="A.A B.B
Hi,
first of all, your example was not reproducible! But once I added
"library(igraph)" and "library(scico)" plus generally replaced
"aes_collapsed" by "edge_list", I started to work :-)
Anyway, the error is produced by this line:
+ edge.width= network,
It seems to me that you have forgott
Hi,
the command line with 'text' should be:
text(-8,-8, expression(R^2 * " = 0.62, r = 0.79, N = 161"), cex = 2 )
Best,
Kimmo
su, 2024-02-04 kello 17:16 +0100, Jibrin Alhassan kirjoitti:
> Here is the script I used to plot the graph indicating the text I
> wanted to
> insert. The line in the
Hi,
maybe this works:
expression(R^2 * "= 0.62")
HTH,
Kimmo
4. helmik. 2024, 16.11, Jibrin Alhassan
mailto:jibrin.alhas...@unn.edu.ng>> kirjoitti:
I have done a scatter plot in R. I want to insert the coefficient of
determination R^2 = 0.62 as a text in the plot. I have tried to write R^2
bu
Hi,
when using 'scale_colours_manual' the colours must be defined as value-
color pairs (i.e. "A"="red", "B"="blue" an so on). If you read the
documentation it is recommended to use a named vector.
If I understood it correctly, in your code #2 R understood the variable
"Stat" as a number (i.e. co
Hi,
ke, 2023-07-26 kello 02:04 +, Thomas Subia via R-help kirjoitti:
> Question 1:How can I save the plotly graph with a specific graph
> size?Using ggsave, one can define the height, width and unit of
> measure, is there something similar in plotly?Since I am creating the
> same gauge plot bu
Hi,
Have you tried:
scale_y_continuous(trans='log10')
HTH,
Kimmo
Lähettäjä: Maria Lathouri via R-help
Lähetetty: maanantai 17. heinäkuuta 2023 23.01.57
Vastaanottaja: Maria Lathouri via R-help; Ivan Krylov
Aihe: Re: [R] how to change the y-axis to logar
Hi,
try:
scale_y_continuous(trans='log10')
HTH,
Kimmo
17. heinäk. 2023, 1.58, Maria Lathouri via R-help
mailto:r-help@r-project.org>> kirjoitti:
I will find the ggplot help.
But I have tried everything, including what you have suggested and nothing
works.
Kind regards,
Maria
Στις Κυρ
Hi,
or maybe this?
NamesLong<-data.frame(Names=unlist(NamesWide), row.names = NULL)
HTH,
Kimmo
ma, 2023-04-03 kello 16:23 +, Ebert,Timothy Aaron kirjoitti:
> My first thought was pivot_longer, and stack() is new to me.
> How about append(c1,c2) as another solution? Or
> data.frame(append(
Hi!
No question. No idea, what you want to achieve. So do not be surprised
that we cannot give you any help.
Kimmo
ti, 2022-04-05 kello 21:59 -0400, ihejirika christopher via R-help
kirjoitti:
> install.packages("titanic")
> library(titanic)
>
> training_set <- titanic_train#Saves the train set
Hi!
If I understood this correctly, you want to pivot the columns from 2 to
25 and use the first column as a "key". Your data has 27 columns in
total, right?
I tested it with your data and seems that the parameter 'cols' does
have some problems. It takes all variables irrespectively of the range
Hi!
Maybe with this:
text(x=0.6, y=1.2, paste0(capture.output(res), collapse="\n"), adj=0)
HTH,
Kimmo
to, 2021-09-16 kello 14:12 +, PIKAL Petr kirjoitti:
> Virhe vahvistaessa allekirjoitusta: Virhe tulkittaessa
> Dear all
>
> I know I have seen the answer somewhere but I am not able
Hi!
Thank you very much for the fascinating solutions. Nice to learn
different approaches. All solutions seem to work with text data as
well.
@Gabor (who suggested the 'igraph' package): yes, I am familiar with
'igraph' and the solution suggested by you works fine, too. Since I
need this kind of
with 'count(pair)'.
I have done a lot of searching but not found any function providing
this functionality. Does someone know an alternative, maybe a more
effective function/solution?
Best,
Kimmo Elo
--
Dr. Kimmo Elo
Senior researcher in European Studies
=
Hi,
something like this (a customised version based on this:
https://stackoverflow.com/questions/25768305/r-replace-multiple-values-in-multiple-columns-of-dataframes-with-na
):
--- snip ---
col_idx<-grep("^var[123]", names(df))
m1<-as.matrix(df[,col_idx])
m1[m1=="a"]<-"z"
df[col_idx]<-m1
df
--
Hi!
How about this?
--- snip ---
> x <- c("STRING 01. Remainder of the string","STR ING 01. Remainder
of the string","STRIN G 01. Remainder of the string","STR IN G
01. Remainder of the string")
> x1<-unlist(strsplit(x,"\\."))
> for (i in seq(1,length(x1),2)) { x[(i+1) %/% 2]<-paste(gsub(
Hi!
Should it be:
as.Date(oriDates, format="%d/%m/%y") # See the order of %d and %m!!
This command seems to work for me, here the output:
[1] "2020-01-23" "2020-01-24" "2020-01-25" "2020-01-26" "2020-01-27"
"2020-01-28" "2020-01-29" "2020-01-30"
[9] "2020-01-31" "2020-02-01" "2020-02-02" "202
28 matches
Mail list logo