Displaying 20 results from an estimated 200 matches similar to: "How to delete matrix rows based on NA frequency?"
2009 Nov 11
1
Loadings and scores from fastICA?
Hi all,
Does anyone know how to get the independent components and loadings from an Independent Component Analysis (ICA), as well as principal components and loadings from a Pricipal Component analysis (PCA) using the fastICA package? Or perhaps if there's another way to do ICAs in R?
Below is an example from the fastICA manual (http://cran.r-project.org/web/packages/fastICA/fastICA.pdf)
2010 Jan 28
2
NA Replacement by lowest value?
Hi all,
I need to replace missing values in a matrix by 10 % of the lowest available value in the matrix. I've got a function I've used earlier to replace negative values by the lowest value, in a data frame, but I'm not sure how to modify it...
nonNeg = as.data.frame(apply(orig.df, 2, function(col) # Change negative values to a small value, close to zero
{
min.val =
2009 Oct 16
2
Division of data frame and deletion of values from column
Hi all,
I guess this might be an easy question, but I've searched multiple help pages without finding any answear... so now I put my trust in you!
I have a data frame (36 variables and 556 observations). One column contains three factors, and I would like to divide the data frame into three new ones, based on the value of the factors, thereby having only one value for all elements of the
2009 Nov 04
2
PCA with tow response variables
Hi all,
I'm new to PCA in R, so this might be a basical thing, but I cannot find anything on the net about it.
I need to make a PCA plot with two response variables (df$resp1 and df$resp2) against eight metabolites (df$met1, df$met2, ...) and I don't have a clue how to do... and I've only used the simplest PCAs before, like this:
pcaObj=prcomp(t(df[idx, c(40:47)]))
2009 Dec 17
2
Exchange NAs for mean
Hi all,
I'm have a matrix (X) with observations as rows and parameters as columns. I'm trying to exchange all missing values in a column by the column mean using the code below, but so far, nothing happens with the NAs... Can anyone see where the problem is?
N<-nrow(X) # Calculate number of rows = 108
p<-ncol(X) # Calculate number of columns = 88
# Replace by columnwise
2009 Dec 07
1
Multiple regression script
Hi all,
I'm doing Multiple linear regression for a data set. However, it takes a lot of time, as I would like to check every possible combination of factors, evalute the results based for instance on their p values, and then choose the best regression model.
So, I wonder if anyone might have a script for that? Or if not, do you have some suggestions how to create such a script?
I've
2009 Nov 05
1
Set colors in a PCA plot based on a gradient vector
Hi all,
I'm making a PCA plot with eight variables (columns taken from a larger data frame "fieldTrial0809[idx,c(39:46)]"). I then want the symbols in the plot to be colored as a gradient from red to blue, depending on the value of another column in "fieldTrial0809[idx, c(48)]" containg temperatures from -12.1 to -5.4.
I don't want to use the heat.colors(n)
2009 Oct 27
1
Exclude rows in xyplot
Hi all,
I'm searching for a way to exclude outliers from my dataset while making xyplots. While plotting using pairs(), I exclude specific row in my data frame and save the settings as a variable which I later include as an argument:
# Discard outliers and save settings as idx
idx=with(fieldTrial0809, which(Pro>0 & Pro<0.95 & Fum>0 & Fum<0.4 & Mal>0.1 &
2009 Oct 14
1
Plot overview xy plots from data frame?
Hi,
I've got a data frame (556 rows and 36 columns) from which I need to create several xy plots and print to pdf, in order to detect outliers and trends in the data. 16 of the columns contains numerical values, and I would like to create graphs for all combinations. It can be done manually, but creating 256 plots by hand takes time... I guess I have to iterate through the data frame, but
2009 Oct 23
5
Change positions of columns in data frame
Hi all,
Probably a simple question, but I just can't find a simple answear in the older threads or anywhere else.
I've added some new vectors as columns in a data frame using cbind(). As they're all put as the last columns inte the data frame, I would like to move them to specific positions. How do you do to change the position of a column in a data frame?
I know I can use
2008 Feb 02
1
Help with loops and how R stores data
I am trying to make an array c(3,8) that contains the averages of what is in
another array c(9,8). I want to average rows 1:3, 4:6, 7:9 and have a loop
replace the generic 1:24 values in my array with the average of the three
rows.
The problem I am having is that R only replaces the last value from the
loops, and I am not experienced enough with R to know how it stores data
when looping and
2008 Aug 07
2
colouring a tree
Hi all.
I would be very pleased if someone could help me, as I do not seem to get the different branches of my tree painted in different colours. The closest I get is colouring the names of my samples(=names of the branches). Here is the code.
data <- read.table(file = "S://SEDIM//TRFLP//B12.5_50-700bp.txt" , as.is = TRUE, header = TRUE, sep = "\t", row.names =
2009 Nov 19
2
3D plot, rotatable and with adjustable symbols
Hi all,
I've tried to make a 3D plot, but have run into some problems.
I'd like to have a plot that I can rotate interactively using the mouse, which is possible using the plots3d {R.basic}. However, I would like to change the symbols used as the points, but there's no pch in plot3d().
If I use the Scatterplot3d package, I'm able to change this, but not able to rotate
2008 Jan 23
3
help with replacing all comma in a data frame with a dot
Dear list,
I have imported a spss data file in R, where a comma is used to separate the decimal numbers, e.g. 3,567 instead of 3.567 as in R. How can I replace the comma with a dot for all values in the data frame
>kk
a b c d e f
1 ,0925199910320613 82523 8 ,855 ,803 ,69
2 ,278314161923372 91657 26 1,285 1,032 ,823
3
2009 Nov 13
1
Trellis settings get lost when printing to pdf
Hi all,
I've got some problems when changing the trellis settings for the lattice plots. The plots look exactly as I want them to when calling show.settings() as well as when plotting them in the graphical window. But when printing to a pdf file, none of the settings are used!? Does anyone know what might have happened? Because the when changing the trellis settings, these should remain in
2010 Jan 15
1
Remove part of string in colname and calculate mean for columns groups
Hi all,
I have two question. First, I wonder how to remove a part of the column names in a matrix? I would like to remove the "_ACCX" or "_NAX" part below. Is there a method where the "_" as well as all characters after i can be removed?
> dim(exprdata)
[1] 88 512
>
> colnames(exprdata[,c(1:20)])
[1] "Akita_ACC1" "Akita_ACC2"
2023 Jul 14
1
ComputerSecureChannel -Verbose False since windows 10/11 update 07/2023
Mandi! Ralph Boehme via samba
In chel di` si favelave...
> just fyi:
> https://lists.samba.org/archive/cifs-protocol/2023-July/004004.html
I see the reference from a Microsoft man on an internal ticket:
TrackingID#2307130040007086
Can be plausible a client-side solution, via a registry/policy patch?
Someone have some clue?
Thanks.
--
Il backup ? quella cosa che andava fatta
2007 Dec 30
2
Installing Rgraphviz package on a windows vista pc
Hi,
I want to install Rgraphviz on a windows vista pc. The only source file that I found in the bioconductor homepage is a tar file. I can't install from this using the packages command in the R menu. I would like to get some tips on how I can do the installation.
Can I just place the extracted Rgraph folder (from the source tar file) in the library folder of R2.6.1 along with the other
2023 Jul 13
2
ComputerSecureChannel -Verbose False since windows 10/11 update 07/2023
Hi all,
just fyi:
https://lists.samba.org/archive/cifs-protocol/2023-July/004004.html
Cheers!
-slow
--
Ralph Boehme, Samba Team https://samba.org/
SerNet Samba Team Lead https://sernet.de/en/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc:
2009 Oct 27
2
Print several xyplots to the same page in a pdf file
Hello everybody,
I'm using the lattice package and the xyplot to make several graphs like below. However, I can just print the three grouped plots onto one page as I'm putting them into a pdf-file, which gives me a huge amount of pages... Is it possible to put them all, or at least more than one on the same page, for instance put three groups beside each other like columns?
...