The question seems easy but I could not find an answer for it. I have the
following column in my data frame and I want to take average of the column
excluding the number of NAs.
$X2016.Q1 : int 47 53 75 97 NA NA 23 NA 43 NA
Does anyone know how to do that?
Thanks for any help
Elahe
__
Hi all,
The question seems easy but I could not find an answer for it. I have the
following column in my data frame and I want to take average of the column
excluding the number of NAs.
$X2016.Q1 : int 47 53 75 97 NA NA 23 NA 43 NA
Does anyone know how to do that?
Thanks for any help
El
Hi all,
I have 2 data frames like the following:
the first one df1:
'data.frame': 141obs. of 1 variable:
$SerialNum: int 41006 41013 41044 41046 41067 41166 41202 41262 41274 41290
and the second one df2:
'data.frame': 194 obs. of 2 variables:
$Serial: int 41006 41013 41018 41
Hi all,
I have this column as a part of df:
$License : Factor W/384 levels "41005","41006","41034","41097","41200",...
and I have other column which is a part of other df lets say df2:
$Diff: int 41166 41202 41290 41353 41503 41507 41548
these two columns df$License and df$Diff
Yes, found it. Thanks
On Tuesday, June 28, 2016 4:57 PM, Duncan Murdoch
wrote:
On 28/06/2016 10:48 AM, ch.elahe via R-help wrote:
> Hi all,
> I have the following df:
>
>
> licenseY :int 41006 41013 41044 41046 41067 41166 41202 41262
> 41274 41290
> lice
Hi all,
I have the following df:
licenseY :int 41006 41013 41044 41046 41067 41166 41202 41262 41274
41290
licenseZ :int 41006 41013 41018 41044 41046 41067 4 41200 41262
41272
I needed the common values in both license columns so I used :
intersect(df$licenseY
Dear Kimmo,
I already used df$speed[training] in df.xyf but I get this error:
Error in xyf(Xtraining,factor(df$speed[training]),grid=somgrid(5, :
NA/NaN/Inf in foreign function call (arg 1)
On Wednesday, June 22, 2016 3:48 AM, K. Elo wrote:
Hi again!
21.06.2016, 21:33, chalabi.el...@ya
column in Y element of xyf
>
>
> On Thursday, June 16, 2016 2:29 PM, K. Elo wrote:
> Hi!
>
> Some sample data could help us to help you...
>
> But have you read '?xyf' in order to ensure that your 'Y' is what 'xyf'
> expects it to be?
>
>
Hi all,
how should I avoid duplicate labels in geom_text for bar chart? in the bar
chart below I have name of one country repeated several times on my bars, I
only want COUNTRY to be shown above each bar:
ggplot(df,aes(factor(Variable1),y=Variable2,fill=Variable3))+geom_bar(stat='identity')
Hi all,
I have a question about how to visualize my df! here is my df I need to
visualize:
'data.frame': 455 obs. of 128 variables:
$Protocol :Factor w/132 levels "_unknown","PD FS SAG","T1 SAG FS","T2
FS OR",...
$NRuns : int 45 45 156 75 89 69 ..
$Speed
Hi all,
I want to use world map in ggplot2 and show my data on world map. my df is:
$ COUNTRY : chr "DE" "DE" "FR" "FR" ..
$ ContrastColor : int 9 9 9 9 13 9 9 9 9 ..
$ quant : Factor w/ 4 levels "FAST","SLOW",..I need to merge my
df with world_map data
a could help us to help you...
But have you read '?xyf' in order to ensure that your 'Y' is what 'xyf'
expects it to be?
What kind of error messages do you get?
Regards,
Kimmo
16.06.2016, 15:13, ch.elahe via R-help wrote:
> Is there any answer?
>
>
&
Is there any answer?
Hi all,
I have a df and I want to use supervised Self Organizing Map to do
classification. I should use Kohonen library and xyf function from it. As you
know the xyf function looks like this and I have problem defining my Y:
xyf(data,Y,grid=somgrid(),rlen=100,alpha=c
Hi all,
I have a df and I want to use supervised Self Organizing Map to do
classification. I should use Kohonen library and xyf function from it. As you
know the xyf function looks like this and I have problem defining my Y:
xyf(data,Y,grid=somgrid(),rlen=100,alpha=c(0.05,0.01))
I want to do
Hi all,
I want to use Supervised Self organizing Maps from Kohonen package for my data.
I need to divide my df into training set and test set, but a part of my df
contains column with factor levels and I don't know how to bring them into my
training set. Currently I use the following command fo
Hi all,
I want to use Supervised Self organizing Maps from Kohonen package for my data.
I need to divide my df into training set and test set, but a part of my df
contains column with factor levels and I don't know how to bring them into my
training set. Currently I use the following command
Hi all
I have generated a 3D interactive rgl.sphere but I don't know how to save it to
be viewed also interactive(being able to rotate it and do zoom-in and out).
Does anyone know how should I save it?
Thanks for any help!
Elahe
__
R-help@r-project.or
t
to scale character or factor data? Could you perhaps exclude some of the
columns that don't belong in the scaled data?
--
Sent from my phone. Please excuse my brevity.
On June 1, 2016 7:39:30 AM PDT, "ch.elahe via R-help"
wrote:
Hi all,
>I want to use Self Organizing Map in R f
Hi all,
I want to use Self Organizing Map in R for my data. I want my training set to
be the following subset of my data:
subdf=subset(df,Country%in%c("US","FR"))
next I should change this subset to a matrix but I get the following error:
data_train_matrix=as.matrix(scale(subdf))
://stackoverflow.com/questions/6455088/how-to-put-labels-over-geom-bar-in-r-with-ggplot2
or this:
http://stackoverflow.com/questions/12018499/how-to-put-labels-over-geom-bar-for-each-bar-in-r-with-ggplot2
Best,
Ulrik
On Fri, 27 May 2016 at 15:12 ch.elahe via R-help wrote:
>Hi all ,
>I ha
Hi all ,
I have the following bar chart and I want to add SLC variable values to the
charts but I don't know how to use geom_text:
ggplot(df,(Protocol,fill=quant))+geom_bar()+coord_flip()
Thanks for any help!
Elahe
__
R-help@r-project.org mai
Hi all,
I have the following df and I want to know which Protocols are VeryFast, which
are FAST, which are SLOW and also which ones are VerySLOW :
$ Protocol : Factor w/ 48 levels "DP FS QTSE SAG",..: 5 5 28 5 5 5 7 7
47 5 ...
$ quant : Factor w/ 4 levels "FAST","SLOW",.
Hi all,
I have the following df:
$ Protocol : Factor w/ 48 levels "DP FS QTSE SAG",..: 2 3 43 42 31 36
37 30 28 5 ...
$ Speed : chr "SLOW" "SLOW" "SLOW" "VerySLOW" ...
How can I get the most frequent Protocol when Speed is "SLOW"?
Thanks for any help!
Elahe
_
Hi all,
Here is my df and I want to make an averaged model of my variables based on
Time like the following:
$ Protocol : Factor w/ 48 levels "DP FS QTSE SAG",..: 2 3 43 42
$ Time : num 182 185 189 234 186 ...
$ Systemtype : Factor w/ 2 levels "Aera XJ","AERA XQ": 1 1
Hi all,
I am using R version 3.2.3 and I want to plot 3D histogram or 3D scatterplot.
Does anyone know which packages can be used for this version for 3D plots? I
tried plot3d but it's not working for this version.
Thanks for any help.
Elahe
__
R-he
, Michael Dewey wrote:
Dear Elahe
In line
On 16/05/2016 13:31, ch.elahe via R-help wrote:
> Hi all,
> I have a column in my df and I want to get quartiles for this column and then
> calculate mean for each and every quartile, here is my column:
>
The quartiles are strictly speaking the bo
Hi all,
I have a column in my df and I want to get quartiles for this column and then
calculate mean for each and every quartile, here is my column:
df$BR
[1] 384 384 384 384 512 384 384 320 320 320 320 320 320 320 320 320 320 384
[19] 384 384 320 320 320 320 384 384 256 320 320 32
Thanks Duncan,
This type.convert works fine for me and gives me TSTMean with decimal, but I
want to add this result as a new column to my df as int or num, how can I do
this?
Thanks,
Elahe
On Friday, May 13, 2016 2:15 PM, Duncan Murdoch
wrote:
On 13/05/2016 7:56 AM, ch.elahe via R-help
Hi all,
I have a df which a part of this is:
TSTMax :int 213 228 227 281
TSTMin :int 149 167 158 176
TSTMean:Factor w/94 levels "100,2" , "104,3" , ...
I want to change the TSTMean into numeric but by using
as.numeric(as.character(df$TSTMean)) I get too many NAs.
Is there a
Hi all,
I have a plot for TSTMean vs. SNRMean and both of these variables are factors.
How can I use Logistic Regression for factor variables?
Currently I use model=lm(TSTMean~SNRMean,data=df) but when I check
summary(model) I get this error: r error in quartile.default (resid) factors
are not
Hi all,
I know it seems simple but I am trying to copy a code and I don't know what is
the problem with this command!
msubsub=msub[,cn]
the error I get is : error in '[.data.frame '(msub, ,cn) : undefined columns
selected
Thanks for any help,
Elahe
_
;On Mon, May 2, 2016 at 7:42 AM, wrote:
>
>Thanks Peter, you were right, the exact grepl is
>grepl("(.*t2.*pd.*)|(.*pd.*t2.*)",df$Command), but it does not change anything
>in Command, when I check the size of it by
>sum(grepl("(.*t2.*pd.*)|(.*pd.*t2.*)",df$C
|(.*pd.*t2.*)",df$Command), but it does not change anything
in Command, when I check the size of it by
sum(grepl("(.*t2.*pd.*)|(.*pd.*t2.*)",df$Command)) the result is 0, but I am
sure that the size is not 0. It seems that this AND does not work.
>
>
>
>On Monday, M
not 0. It seems that this AND does not work.
On Monday, May 2, 2016 5:05 AM, peter dalgaard wrote:
On 02 May 2016, at 12:43 , ch.elahe via R-help wrote:
> Thanks for your reply tom. After using
> Subset(df,grepl("(.*t2.*pd.*)|(.*pd.*t2.*)"),df$Command) I get this error:
pd.* t2.*)",df$Command)
On Sat, Apr 30, 2016, 7:07 PM Tom Wright wrote:
subset(df,grepl("t2|pd",x$Command))
>
>
>
>
>On Sat, Apr 30, 2016 at 2:38 PM, ch.elahe via R-help
>wrote:
>
>Hi all,
>>
>>I have one factor variable in my df and I want
Hi all,
I have one factor variable in my df and I want to extract the names from it
which contain both "t2" and "pd":
'data.frame': 36919 obs. of 162 variables
$TE:int 38,41,11,52,48,75,.
$TR:int 100,210,548,546,.
$Command :factor W/
mutate(key = grep(".*(t1|t2).*", "\\1", Command, value = TRUE)) %>%
> filter(!(Command %in% c('t1', 't2')))
>
>This will give you a subset with just t1/t2 and you can use 'key' as the
>colour option for ggplot.
>
#x27;)))
This will give you a subset with just t1/t2 and you can use 'key' as the colour
option for ggplot.
Jim Holtman
Data Munger Guru
What is the problem that you are trying to solve?
Tell me what you want to do, not how you want to do it.
On Sat, Apr 23, 2016 at 4:16 PM, ch.e
Hi
I have the following df and I created two subsets but I don't know how to use
these subsets as the colors of my plot.
data.frame': 36919 obs. of 162 variables
$TE :int 38,41,11,52,48,75,.
$TR :int 100,210,548,546,.
$Command :factor W/2229
repl("t2", Command, fixed=TRUE)
> Command[hast1]
[1] "_localize_t1_seq" "_localize_PD_t1"
> Command[hasPD]
[1] "_localize_PD""_localize_PD_t1"
> Command[hast1 & hasPD]
[1] "_localize_PD_t1"
Jean
On Fri, Apr 22, 2016 at 8:42
Hi all,
I have a data frame df and I want to do subset based on several conditions of
letters of the names in Command.1)if the names contain PD 2)if the names
contain t1 3)if the names contain t2 4)if the names contain t1 and PD 5)if the
names contain t2 and PD 6)otherwise the names would be
Hi all,
Does anyone know how to overlay two facet_grids? I have two facet grids as
following:
ggplot(data=df,aes(x=TE,y=TR,color="orange"))+geom_point()+facet_grid(FS+TRJ~OR+INV,labeller=label_both)+xlim(0,200)+ylim(0,1)
ggplot(data=df,aes(x=TE,y=TR))+geom_point(aes(color=TST))+facet_grid(FS
facet_wrap or facet_grid give you what you want?
On Sat, Apr 16, 2016 at 8:45 AM, ch.elahe via R-help
wrote:
Hi,
>I have a data set (mydata), which a part of this is like the following:
>
>
>'data.frame': 36190 obs. of 16 variables:
>$ RE: int 38 4
Hi,
I have a data set (mydata), which a part of this is like the following:
'data.frame': 36190 obs. of 16 variables:
$ RE: int 38 41 11 67 30 18 38 41 41 30 ...
$ LU : int 4200 3330 530 4500 3000 1790 4700 3400 3640
4000 ...
$ COUNTRY: Fa
Hi,I have a data set (mydata), which a part of this is like the following:
'data.frame': 36190 obs. of 16 variables:$ RE : int 38 41
11 67 30 18 38 41 41 30 ...$ LU : int 4200 3330 530 4500
3000 1790 4700 3400 3640 4000 ...$ COUNTRY : Factor w/
45 matches
Mail list logo